Reputation: 548
Hi friends I have an one issue, how to likes a page in Facebook from my application?? I am able to retrieve all the information of Facebook page using page id, also i am able to comment to the page wall, my requirement is that would be able to likes a page in Facebook which i am unable to do..??.I have gone through graph API but unable to find solution..??
I tried this code
dialog = ProgressDialog.show(MyApp.this, "",
"please wait..", true, true);
Bundle params = new Bundle();
mAsyncRunner.request("PAGE_ID/likes",params,"POST",new UploadListener(), null);
public class UploadListener implements RequestListener {
@Override
public void onComplete(String response, Object state) {
System.out.println("THE RES IS : "+response);
dialog.dismiss();
}
once i run this code it gives error THE RES IS :
{
"error":
{
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3
}
}
Upvotes: 0
Views: 7562
Reputation: 1372
The Facebook documentation for Pages has been updated and is current (see https://developers.facebook.com/docs/reference/api/page/). You cannot like a Page via the Graph API, even though you can read the like count information. There are not an API for it, you can try this. like android application page in facebook from application itself
Upvotes: 3