Facebook share link without JavaScript

You could use <a href=”https://www.facebook.com/sharer/sharer.php?u=#url” target=”_blank”> Share </a> Currently there is no sharing option without passing current url as a parameter. You can use an indirect way to achieve this. Create a server side page for example: “/sharer.aspx” Link this page whenever you want the share functionality. In the “sharer.aspx” get the refering url, and … Read more

How to get Likes Count when searching Facebook Graph API with search=xxx

Couldn’t find this in the documentation but multiple calls to the API are not necessary. You can use summary when querying a feed or multiple posts. Specify this in the fields parameter. https://graph.facebook.com/PAGE_ID/feed?fields=comments.limit(1).summary(true),likes.limit(1).summary(true) This will return a response like this. { “data”: [ { …. “summary”: { “total_count”: 56 } … }, { …. “summary”: … Read more

Do I need an appId for a XFBML version of the Facebook Like button?

Answering my own question, after pulling out all my hair… http://developers.facebook.com/docs/guides/web/ “The JavaScript SDK requires that you register your website with Facebook to get an App ID (or appId). The appId is a unique identifier for your site that ensures that we have the right level of security in place between the user and your … Read more

How to add to my android application a button than do like to a facebook page?

Use this library: Facebook Like button for Android. There is detailed manual here. Sources: https://github.com/shamanland/facebook-like-button Gradle dependency: repositories { mavenCentral() } dependencies { compile ‘com.shamanland:facebook-like-button:0.1.8’ } The simplest way to add like button: <com.shamanland.facebook.likebutton.FacebookLikeButton style=”@style/Widget.FacebookLikeButton” app:pageUrl=”http://blog.shamanland.com/” app:pageTitle=”Developer’s notes” app:pageText=”This is blog about Android development.” app:pagePicture=”@drawable/ic_launcher” /> This view will be drawn in your layout: In … Read more

Android WebView for Facebook Like Button

To get past the blank page you do this: webview.setWebViewClient(new LikeWebviewClient(this)); private class LikeWebviewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { Log.d(TAG, “onPageFinished url: ” +url); // Facebook redirects to this url once a user has logged in, this is a blank page so we override this // http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php?………… if(url.startsWith(“http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php”)){ String … Read more