Search code examples
iosfacebookfacebook-graph-apifacebook-likefacebook-ios-sdk

Facebook get number of likes on custom object without login


I am using og.likes to like custom object from my app, with the help of Facebook-iOS sdks. I am able to like object and also read the like.

Now I want to know if there is any way in graph API that, I can show total number of likes on an object to a user who is not logged in to our app via Facebook ? i.e without access token


Solution

  • Got Response from Facebook Team :

    Since Graph API v2.0, all requests to the API require an access token. You can proxy this request through a web-server and use your app access token for example.

    You could as well make the request from your app by shipping your app access token with the app, but I highly advise against this as the app token should be kept secret.

    Please note that the SDK does not support using the app access token for security reasons. So you have to write your own networking code to fetch this data.