Facebook API,无需客户端认证,用于公开内容 [英] Facebook API without client authentication for public content

查看:154
本文介绍了Facebook API,无需客户端认证,用于公开内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为已经在Facebook上拥有他的产品照片的客户开发一个网站,他希望将相同的相册复制到他的网站上。我已经在使用Facebook Connect,所以我把 photos.getAlbums photos.get 的组合动态地画廊。

I'm developing a site for a client who already have the photos of his products on Facebook, and he wants the same albums to be replicated over his site. I was already using Facebook Connect, so I dropped a combination of photos.getAlbums and photos.get to dynamically make the galleries.

到目前为止这么好,但是后来我意识到,如果没有用户登录到FBC,则不会创建会话,并且API变得不可用,即使是内容公开上市我显然想向所有人显示相册,而不仅仅是连接他们的帐户的人。

So far so good, but then I realized that if there's no user logged trough FBC, no session is created and the API becomes unusable, even for content that is publicly available. I obviously want to show the albums to everyone and not just the people who connect their accounts.

这是Facebook API中所有功能的工作原理?对于这种情况,最好的(更容易实现)的解决方法是什么?

Is this how all functions in the Facebook API work? What's the best (easier to implement) workaround for this situation?

推荐答案

截至2010年9月,您现在可以应用程序,没有关联的用户。有关详细信息,请参阅 http://developers.facebook.com/docs/authentication/ 。或者您可以运行此示例代码以获取访问令牌:

As of September 2010, you can now authenticate just as an application, with no associated user. See http://developers.facebook.com/docs/authentication/ for details. Or you can run this example code to get an access token:

curl -F grant_type=client_credentials \
 -F client_id=your_app_id \
 -F client_secret=your_app_secret \
 https://graph.facebook.com/oauth/access_token

这篇关于Facebook API,无需客户端认证,用于公开内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆