English 中文(简体)
网上抓取Facebook
原标题:Grabbing facebook feed in website

我为我的客户开发移动网站。 这个特定客户想要在网站上显示一些Facebook挂图活动。 我已经查看了Facebook图Api, 并且对认证感到困惑。

I need the blah in https://graphs.facebook.com/clientsfacebookid/feed?access_token=blah in order to grab the info i want. I read about authentication and all of that but it doesn t seem to serve my purposes.. For example a lot of the stuff I read about getting a token is related to creating apps and stuff - which is not what I m trying to do. A lot of ways to authenticate redirect users to log in or grant access to the information but this also doesn t seem like it fits my scenario.

我应该和我的委托人谈谈 让他们给我发一个访问代码 或者设置一条溪流 这样我就可以找到一个最新的访问代码 每当我需要它的时候

有什么想法吗?

P.S. I am trying to implement this via an ajax call in javascript. Thanks!

问题回答

您需要做的是创建一个 Facebook App, 并让您的客户端在他们的页面上添加此选项。 然后您可以得到此应用程序的 OAUT 符号, 并用它查询客户端的种子 。 详情请参见 < a href=" https:// developers. facebook. com/docs/audemintication/applications/" rel=“ nofollow" > facebook 文档 。

如果您想要从页面中抓取数据, 它实际上就简单得多。 创建一个 App, 但是不需要将其添加到实际页面中。 您可以按照 < a href=" https:// developmenters. facebook. com/docs/ opengraph/ useing- app- tokens/" rel="nofollow" 来生成 App App Access Token 。 您可以在 Facebook 开发者 网站 < / a > 上生成一个 App App Access Token 。

Then, all you need to do is call the Graph API with the generated access_token. E.g.: https://graph.facebook.com/{page_id}/feed?access_token={app_access_token}

然后您可以使用 Facebook 上返回的数据来显示页面上选中的状态 。

页面管理员不需要将应用程序添加到页面, 此方法可用于剪贴任何已公布的页面。 无论如何, 页面上的文章是公开的, 您只需要一个 < code> access_ token 才能访问页面 。

如果您想要一个简单的学习方式, 并举一个工作模式的范例来尝试 < a href="http://fourgefeed.com" rel="nofollow"> fourgefeed.com 它的简单框架, 简单可以执行类似jquery 的例子 。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签