简体   繁体   中英

iOS: Parse framework & Facebook OpenGraph

Has anyone out there integrated Facebook OpenGraph in to your iOS app using the Parse (www.parse.com) framework as your backend?

My goal is simply to post images to Facebook from my iPhone app using OpenGraph . From what I can tell, FB will not host the photos themselves - surprisingly - so I'm on the assumption I need my own backend (or Parse's in this case). (If I'm misunderstanding this, please correct me!)

I've spent most of the last day experimenting with the Facebook framework, and I plan to use Parse for much of my web services in the app, so ideally I would leverage both together and NOT introduce a separate backend/webservice (eg Heroku/Rails) just for simple image hosting.

..but either way I fear could get lost down a deep hole trying to implement something that will never work - web tech is not my strong suit.

I actually got this answered at a Parse.com company event here in SF, and since then have also learned A LOT about Facebook integration and posting.

The long story short is: Parse.com cannot serve as the only object in your web stack if you want to post Facebook Open Graph Stories.

In addition to simply hosting an image, Facebook Open Graph Stories require two things:

  1. A public HTML page that Facebook's servers can reach. This page serves Facebook meta data that Facebook uses to determine how to present your image object.
  2. A click-through link to a landing page that contains your image object.

I ended up using a Tumblr blog to host my photos, because you can 'hack' their Themes to include your own HTML headers that support FB OG Stories. It's not perfect, but for a guy without a web stack, it gets the job done!

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