如何获得与Facebook的API公开的墙帖 [英] How to get public wall posts with the facebook API

查看:244
本文介绍了如何获得与Facebook的API公开的墙帖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米试图从一个配置文件的Facebook墙上获得职位。我与粉丝页面没有问题,我的用户令牌是有效的(至少在扇页)。

I m trying to get wall posts from a profile facebook. I have no problems with the fan pages and my user token is valid (at least for the fan pages).

这个职位例如: https://www.facebook.com/aurelia.filion /职位/ 10151342315613445
正如你所看到的帖子是公开的。

Example with this post : https://www.facebook.com/aurelia.filion/posts/10151342315613445 As you can see the post is public.

所以我尝试:
graph.facebook.com/529628444_10151342315613445?access_token=MY_TOKEN
graph.facebook.com/10151342315613445?access_token=MY_TOKEN

So i try: graph.facebook.com/529628444_10151342315613445?access_token=MY_TOKEN graph.facebook.com/10151342315613445?access_token=MY_TOKEN

返回:
   错误:{
      消息:不支持GET请求。
      类型:GraphMethodException,
      code:100

it returns : "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100

在我的API图形浏览器中,我看不到该用户既不帖子。
graph.facebook.com/529628444?fields=posts(529628444是aurelia.filion的ID)

In my Api graph explorer, i can't see the posts from this user neither. graph.facebook.com/529628444?fields=posts (529628444 is the aurelia.filion's id)

所以是有可能得到墙上的帖子?这是公共它应该是一个办法让他们

So is it possible to get the wall posts? It's public it should be a way to get them

感谢

确定我会以不同的方式解释,我的目标是获得这种职位与图(我能得到所有其他人,除了论文文章)

ok i 'll explain in a different way, my goal is to get this kind of posts with the graph (i can get all others posts except theses)

facebook.com/aurelia.filion/posts/10151342315613445

facebook.com/aurelia.filion/posts/10151342315613445

facebook.com/aurelia.filion/posts/10151336175793445

facebook.com/aurelia.filion/posts/10151336175793445

但我得到的错误不支持GET请求。

but i get the error "Unsupported get request."

我都试过用户令牌,令牌的应用程序这个环节不工作:
graph.facebook.com/529628444_10151342315613445?access_token=MY_TOKEN

i've tried both user token and app token this link doesnt work : graph.facebook.com/529628444_10151342315613445?access_token=MY_TOKEN

当我米,饲料尝试我没有看到,我想在那里的帖子。

when i m trying with the feed i dont see the posts i want in there.

如果我要求的职位graph.facebook.com/529628444/posts?limit=100&access_token=TOKEN
我所看到的一切(链接,图片等),除了吓坏帖子!

And if i request the posts graph.facebook.com/529628444/posts?limit=100&access_token=TOKEN i can see everything (link, photo etc) except the freaking posts!!

我怎样才能获得论文的帖子,它是一个道理的问题,它看起来就像是一个状态,它是不同的就搞定了,我的意思是我们需要的权限?
graph.facebook.com/529628444?fields=statuses&access_token=TOKEN它不返回任何结果!其空!

How can i get theses posts, is it a token problem, it looks like it's a status, is it different to get, i mean do we need permissions? graph.facebook.com/529628444?fields=statuses&access_token=TOKEN it doesnt return any results! its empty!

修改

推荐答案

这答案写回当图形API的版本是它的第一个版本。那时你可以得到用户通过使用用户ID,现在的用户ID应用程序之间不再共享喂养。另外Facebook的创建新的API 的,这只是提供给一些它的合作伙伴。

EDIT

This answer was written back when the Graph API version was in its first version. Back then you could get the user feed by using the user ID, right now the user ID is no longer shared between apps. Also facebook created a new API that it's only available to some of it's partners.

所以现在这是不可能的,你得到大众用户的饲料,除非用户使用你的应用程序。你仍然可以得到网页虽然饲料。

So right now it's impossible for you to get the public user feed, unless the user has used your app. You can still get the Pages feed though.

这答案是图形API V1

This answer was for graph api v1

所以,你必须使用该 https://graph.facebook.com/529628444?fields=feed&access_token=YOUR_TOKEN

如果你想要的是查询公开的数据可以通过这样创建一个APP令牌:

And if all you want is query public data you can create a APP Token by doing this:

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials 

和使用此令牌,而不是使用您的用户令牌。

And use this token instead of using your user token.

这篇关于如何获得与Facebook的API公开的墙帖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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