Facebook喜欢按钮和OAuth Access
I am connecting to the Facebook API using HybridAuth on the server side (backend is written in PHP). This is for a SaaS publishing application that is hosted on our servers. I understand the mechanics of OAuth and that once I accquire the appropriate permissions from the user, I can write and read from the Open Graph API, which in theory will allow me to do almost anything.
The problem is that I would like to use some of Facebook's social plugins. In particular, I would like to implement the like button so that it automatically appears for each blog post, article and page.
The problem is that the like button and the various Facebook plugins require an app_id
. I would prefer not requiring users to add the developer app to their account and creating an app to get an app_id
as it can be a confusing process for non-developers.
Is there anyway we can create or retrieve an app_id
from open graph (which we can store and use to generate the like buttons and other facebook widgets)?
With the migrations, I understand that each liked URL will not have it's own page. Once the user clicks a like button on your site, he automatically likes your page. However, let's say I have a page called http://www.mystore.com/products/some-awesome-product
and there are other similiar pages, all with a like button. Is it possible that when clicking like, the user automatically likes our Facebook page, but when an item is published in their news feed for the like, the URL links to that specific product? Effectively, is there a way for users to like multiple pages from my site?
Update: It looks like we can generate app_id
s programmatically with the create application API in the legacy REST API. However, this does not seem to be an option with the graph API.
我使用 HybridAuth (后端用PHP编写)。 这适用于托管在我们服务器上的SaaS发布应用程序。 我理解OAuth的机制,一旦我从用户那里获得适当的权限,我就可以从Open Graph API中读取和读取,理论上这将允许我做几乎任何事情。 p>
问题是我想使用一些 Facebook的社交插件。 特别是,我想实现按钮,以便自动显示 每篇博客文章,文章和页面。 p>
问题是,类似按钮和各种Facebook插件需要 使用迁移,我了解每个喜欢的网址都不会有 它是自己的页面。 用户点击您网站上的“赞”按钮后,他会自动喜欢您的网页。 但是,假设我有一个名为 更新:看起来我们可以以编程方式生成 app_id code>。 我不希望用户将开发者应用程序添加到他们的帐户并创建应用程序以获取
app_id code>,因为这对于非开发人员来说可能是一个令人困惑的过程。 p>
无论如何我们可以从开放图形创建或检索
app_id code>(我们可以存储和使用它来生成类似按钮和其他facebook小部件)? p>
http://www.mystore.com/products/some-awesome-product code>的页面,还有其他类似的页面,都有类似的按钮。 是否有可能在点击时,用户会自动喜欢我们的Facebook页面,但是当某个项目在其新闻Feed中发布时,该URL会链接到该特定产品? 实际上,用户是否有办法从我的网站上搜索多个页面? p>
app_id code>,使其更容易构建 在旧版REST API中。 但是,这似乎不是图API的选项。 p>
div>
Seems like we cannot programatically create an app_id for an account. This is not an issue, as we will just create a small guide to guide our users through creating an app and submitting the app_id to us using a form. Not perfect, but should be easy to implement.
As for URLs, liking something will not automatically like your Facebook page. If href
is blank, the current page will be liked. If you set your facebook page in the href
parameter, then your facebook page will be liked.