I am trying to work with Facebook's Graph API v2.8 through the php-graph-sdk. My main objective right now is to get page ratings.
I setup a Facebook App which I'll call FB Ratings App and I can read ratings on my Facebook pages, but I ran into problems when I try to have other users get ratings through my app, FB Ratings App.
Here's a breakdown:
User A
- Owns the Facebook App: FB Ratings App
- Owns their Facebook Page: Sample Page A
- Can see the Facebook Page data
- The Access Token says it does not expire.
User B
- Does NOT own the Facebook App: FB Ratings App
- Owns their Facebook Page: Sample Page B
- Can NOT see the Facebook Page data
- The Access Token says it expires in 2 months
When I use the Access Token Debug Tool I see the same expiration time of 2 months for User B for the short lived access token as well as the long lived access token but the token string does change when I send the short token and ask for the long lived token.
Summary
- Users (except for myself) are not getting access tokens that do not expire. Is there a way to renew these without the user logging in again or should I be getting a token that doesn't expire?
- The same users that are getting access tokens of 2 months are not able to get Page Access Tokens for FB Pages that they own and created.
Here's a couple notes on the Facebook App that I created in the developers area. It is set to Public with the status, "Your app is currently live and available to the public." However, I have not submitted the app for approval. I wasn't sure if this was necessary or how to go about this. If I need to do this, does my project need to be finished for Facebook to review the code?
These issue maybe related or they could be separate. The Facebook API is by far the most confusing API that I've worked with.