Most of the examples and tutorials I have found for the Facebook SDK are for publishing to user accounts.
As someone who has used the Facebook PHP SDK but not the Javascript SDK, I can’t find an example or tutorial for the following:
- User clicks FB connect button
- Popup window shows manageable Fan Pages
- User chooses a Page which they’d like my website to manage
- My website gets the ID of the chosen Page
With my website I’m not looking to post information to the admin’s Fan Page, but rather just get the ID of the Page they want to use with my site. Thanks to the PHP SDK, I already have a method of pulling all the information from the admin’s Fan Page that I need.
Is there such a guide?
You can use the graph to get ‘/me/accounts’ which will list all of the apps/pages that the user administrates. You will need to create your own selection pop up for step 2 and 3, using the data from the response object as the values to submit back to your site in step 4.
Try something like this: