Reputation: 11
I'm using Facebook SDK 3.0 for Android.
how make a custom likes button
Request request = new Request(session, page_id + "/likes", null, HttpMethod.POST, new Callback()
{
@Override
public void onCompleted(Response response)
{
Log.i(DEBUG_TAG, response.toString());
// TODO Auto-generated method stub
if (response.getGraphObject() != null)
{
//Log.i(DEBUG_TAG, response.toString());
}
}
});
RequestAsyncTask task = new RequestAsyncTask(request);
task.execute();
page_id = 417732304946490
has OAuthException (#3) Application does not have the capability to make this API call.
no way use in app like ?
Upvotes: 1
Views: 1415
Reputation: 2062
The Facebook graph API does not provide the feature to Like the facebook page. Instead you can open a webview with your page URL, so that your can Log in and Like your page.
// To open webview
String url = "your page URL";
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(i);
Upvotes: 3