回答
你会使用Facebook.dll U可以在Visual Studio中使用软件包管理器如果u使用C#例如
和代码可能看起来像这样
public List<string> Facebook(string query)
{
// Facebook.FacebookAPI api = new FacebookAPI();
List<string> list = new List<string>();
string[] arr = new string[5];
string result = null;
FacebookAPI api = new FacebookAPI(token);
下载
//查询是您的搜索条件
JSONObject q = api.Get("https://graph.facebook.com/search?q="+query+"&type=post");
foreach (JSONObject item in q.Dictionary["data"].Array)
{
if (item.IsDictionary)
{
foreach (KeyValuePair<String,JSONObject> jso in item.Dictionary)
{
if (jso.Key == "message"/* || jso.Key == "name" || jso.Key == "description" || jso.Key == "link"*/)
{
for (int i = 0; i < 5; i++)
{
arr[i] = jso.Value.String;
}
list.Add (jso.Value.String);
}
else if (jso.Key == "likes")
{
foreach (JSONObject like in jso.Value.Dictionary["data"].Array)
{
foreach (KeyValuePair<String, JSONObject> lik in like.Dictionary)
{
if (lik.Key == "name")
{
result += lik.Value.String;
}
else if (lik.Key == "id")
{
result += lik.Value.String;
}
}
}
foreach (KeyValuePair<String, JSONObject> count in jso.Value.Dictionary)
{
if (count.Key == "count")
{
result += count.Value.String;
}
}
}
else if (jso.Key == "from")
{
foreach (KeyValuePair<String, JSONObject> froms in jso.Value.Dictionary)
{
if (froms.Key == "name")
{
result += froms.Value.String;
}
}
}
}
}
/*
else if (item.IsArray)
{
foreach (JSONObject j in item.Dictionary["data"].Array)
{
if (j.IsDictionary)
{
foreach (KeyValuePair<String,JSONObject> x in j.Dictionary)
{
result += (x.Key + " --- "+x.Value.String);
}
}
}
}
*/
}
return list;
}
你当然可以改变后,并查询到任何你想要在Facebook的图形API
搜索和有另一种方式做到这一点使用FQL和其非常容易
希望会有所帮助。
谢谢@Mido,但我想添加这个,但FacebookAPI给我错误我认为它不是在Facebook的DLL,但有没有任何地方,然后再次表明我感谢。我使用Facebook的DLL像这个版本Facebook的5.4 .1.0 – 2012-02-07 14:26:12
你能告诉我你得到的错误吗? :) – Mido 2012-02-07 14:43:17
非常感谢您的回答.. – 2012-02-10 12:19:32
- 1. 如何使用Facebook Graph API在Android Studio中创建新闻Feed?
- 2. 使用facebook API检索新闻提要
- 3. 如何使用Facebook家里的Graph API通过type = status过滤新闻Feed?
- 4. 我正尝试使用Graph API检索特定类型的新闻Feed
- 5. Facebook Graph API在新闻Feed中嵌入Swf
- 6. 如何通过Facebook API检索用户的全新新闻?
- 7. 如何使用Facebook图形API获取新闻Feed?
- 8. Facebook Graph API |页面Feed
- 9. 检索Facebook Graph API结果
- 10. 获取Facebook新闻Feed iOS?
- 11. 如何使用Facebook Graph API检索用户国家?
- 12. 在PHP中使用Graph API发布到Facebook新闻源
- 13. 如何使用api获取新闻Feed究竟如何出现在Facebook首页新闻源中
- 14. 如何使用Graph API获取照片Feed的Facebook Insights数据?
- 15. 如何从Facebook Graph API中吸引热门新闻?
- 16. 用Facebook Graph API检索组事件
- 17. 如何使用Graph API从facebook中检索ID数组?
- 18. 如何使用FQL返回新闻Feed
- 19. 如何使用Graph API获取Facebook新闻提要的照片列表?
- 20. 如何使用Graph API从facebook新闻提要中获取图片?
- 21. facebook graph post feed PHP
- 22. Facebook Graph API用户搜索
- 23. 通过Facebook Graph API访问用户的新闻提要
- 24. 使用Facebook Graph API搜索用户
- 25. Facebooker和图形API,获取新闻Feed
- 26. 从Facebook Graph API检索裁剪照片
- 27. 如何使用Facebook Graph API使用Fanpage
- 28. 如何使用Facebook的Graph API检索Facebook页面上的帖子?
- 29. 在Facebook上播放视频新闻Feed
- 30. 从facebook新闻Feed获取视频
[你有什么试过吗?](http://mattgemmell.com/2008/12/08/what-have-you-tried/) – 2012-02-07 07:33:46
我已经尝试使用图形API到Dictionary dic =新词典(); var temp = obj.GetObject(“1078733634_2931461360458”,dic);但难以显示数据。你能更形容吗? –
2012-02-07 07:50:04