I'm developing a site for a client who already have the photos of his products on Facebook, and he wants the same albums to be replicated over his site. I was already using Facebook Connect, so I dropped a combination of photos.getAlbums
and photos.get
to dynamically make the galleries.
So far so good, but then I realized that if there's no user logged trough FBC, no session is created and the API becomes unusable, even for content that is publicly available. I obviously want to show the albums to everyone and not just the people who connect their accounts.
Is this how all functions in the Facebook API work? What's the best (easier to implement) workaround for this situation?
The Graph API is free to use, for all applicable use cases. Rate Limiting applies though, > developers.facebook.com/docs/graph-api/advanced/rate-limiting There is no way to “pay” or > otherwise get those limits raised for normal 3rd party apps.
With the Facebook API, you can access and read public data for Facebook Pages that you are not the admin of. This data, including business metadata, public comments, and posts, can be used for competitive analysis and benchmarking.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
For the record, I managed to solve this situation by developing a small backend that requires the client to login to Facebook once and give offline_access
extended permission to the FB app, so I can save his session key and use it to authenticate the Facebook API client every time I need to use FQL to get non-public content.
One could obviously add some caching in the middle to avoid unnecessary requests to Facebook, but it's been working fine for months now without hitting any limits that I know of.
As of September 2010, you can now authenticate just as an application, with no associated user. See http://developers.facebook.com/docs/authentication/ for details. Or you can run this example code to get an access token:
curl -F grant_type=client_credentials \
-F client_id=your_app_id \
-F client_secret=your_app_secret \
https://graph.facebook.com/oauth/access_token
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With