简体   繁体   English

iOS:解析框架和Facebook OpenGraph

[英]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? 有没有人使用Parse(www.parse.com)框架作为后端将Facebook OpenGraph集成到您的iOS应用中?

My goal is simply to post images to Facebook from my iPhone app using OpenGraph . 我的目标仅仅是使用OpenGraph从iPhone应用程序将图像发布到Facebook 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). 据我所知,FB不会自己托管照片-令人惊讶-因此,我假设我需要自己的后端(在这种情况下为Parse后端)。 (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. 我在最后一天的大部分时间里都在尝试使用Facebook框架,并且打算在应用程序中的大部分Web服务中都使用Parse,因此理想情况下,我将两者结合起来使用,不是引入单独的后端/ 网络服务 (例如Heroku / Rails)仅用于简单的图像托管。

..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. 实际上,我在SF的Parse.com公司活动上得到了这个答案,从那时起,我还学到了很多有关Facebook集成和发布的信息。

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. 长话短说:如果您要发布Facebook Open Graph Stories,则Parse.com不能用作您的Web堆栈中的唯一对象。

In addition to simply hosting an image, Facebook Open Graph Stories require two things: 除了简单地托管图像外,Facebook Open Graph Stories还需要两件事:

  1. A public HTML page that Facebook's servers can reach. Facebook服务器可以访问的公共HTML页面。 This page serves Facebook meta data that Facebook uses to determine how to present your image object. 该页面提供了Facebook元数据,Facebook用来确定如何呈现图像对象。
  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. 我最终使用了一个Tumblr博客来托管我的照片,因为您可以“破解”它们的主题以包括支持FB OG故事的自己的HTML标头。 It's not perfect, but for a guy without a web stack, it gets the job done! 这并不完美,但是对于没有Web堆栈的人来说,它可以完成工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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