我的问题是这样的:如果我有一张feedItem (发布在facebook上的图片),我如何验证我是否喜欢它?我是否可以验证我对feedItem所做的所有交互,或者其他人对其所做的交互(like, dislike, pin, share
)?在getstream.io
中有什么方法可以检索这些交互吗?
先谢谢你...
发布于 2018-08-31 23:00:57
Graph API提供了您需要的所有功能。下面是一些示例:
这是一个对象的字段:https://developers.facebook.com/docs/graph-api/reference/v3.1/post#read
shares
it's a field of a object:https://developers.facebook.com/docs/graph-api/reference/v3.1/post#readlikes
:https://developers.facebook.com/docs/graph-api/reference/v3.1/object/likes#read如果使用用户访问令牌读取,则
/likes仅返回当前用户的配置文件:
相册、照片、帖子、视频
所有的返回值都是JSON,您可以不使用Deserialize Anonymous Type直接使用流,例如likes
{
"likes": {
"data": [
{
"name": "Bill the Cat",
"id": "155111347875779",
"created_time": "2017-06-18T18:21:04+0000"
},
{
"name": "Calvin and Hobbes",
"id": "257573197608192",
"created_time": "2017-06-18T18:21:02+0000"
},
{
"name": "Berkeley Breathed's Bloom County",
"id": "108793262484769",
"created_time": "2017-06-18T18:20:58+0000"
}
],
"paging": {
"cursors": {
"before": "Nzc0Njg0MTQ3OAZDZD",
"after": "NTcxODc1ODk2NgZDZD"
},
"next": "https://graph.facebook.com/vX.X/me/likes?access_token=user-access-token&pretty=0&summary=true&limit=25&after=NTcxODc1ODk2NgZDZD"
},
"summary": {
"total_count": 136
}
},
"id": "user-id"
}
https://stackoverflow.com/questions/52116443
复制相似问题