Search code examples
facebookcommentsphotos

How do I allow users to upload photos and comments to my facebook app?


I need to allow my app's users to upload a photo to the app (not to change their Facebook profile photo) so that other app users (who are not necessarily Facebook friends of the uploader), can see the photo only via this app and comment on it.

What is the right way to do this?

One idea I have in mind is opening a Facebook page for my app and when a user uploads a photo it will be uploaded to app's page. Then when other app users want to see photos and comments they will be loaded from this FB page.


Solution

  • You can allow users to upload photos within your app, store those photos on your server and post them to your pages wall on behalf of your page. You can read from this link under the title "Page Login" and learn how to retrieve the correct access token and make calls as a page.

    Once you have the photos posted as the page, they will be in the list of your pages photos and you'll be albe to store their pid/aid and use those ids to retrieve, add comments/likes on the photos.