简体   繁体   中英

Facebook social features on iframe app

We are developing a facebook iframe application that pulls some images (via an API) to the current user album (creates a new one).

The user views his newly uploaded album photos using a facebook lightbox clone. In this clone he must be able to comment and like the current viewed photo.

Is there a way to provide facebook comments & like to these pictures without the use of the Graph API (which would require us to replicate a lot of visuals).

Another try was the social plug-ins with the facebook photo url given but no success.

Any ideas?

I would recommend using the social plugins that facebook provide.

For the likes and comments you can specify a URL in the plugin code, that URL should be the URL of the photo relative to your app eg http://myapp.com/photo/123 and not the http://app.facebook.com address.

Facebook will need to be able to crawl that URL so if you are checking if the user is logged in via PHP then you should either disable this if the user agent contains facebookexternalhit or show a different page for that user agent. It doesn't matter about the content, just set a couple of og: meta tags and that should be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM