Facebook Open Graph API-动作类型和另一个应用程序的对象类型(foursquare) [英] Facebook Open Graph API - action-type & object-type of another application (foursquare)

查看:96
本文介绍了Facebook Open Graph API-动作类型和另一个应用程序的对象类型(foursquare)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试检索使用开放图发布到Facebook的用户的Foursquare签入数据。通常,我在查找有关我不拥有的应用程序的信息(命名空间,操作类型和对象类型)时遇到了麻烦。



到目前为止,我的应用程序已成功询问了用户(我认为是)的适当权限,以访问他们提交给foursquare FB应用程序的数据:

  user_actions: playfoursquare 

当我在新的时间轴中访问Foursquare应用程序页面时,从网址中找到了 playfoursquare:

  http://www.facebook.com/ [my_username] / app_playfoursquare 

现在,我尝试使用具有以下结构的url查询Graph Api :(参考: http://developers.facebook.com/docs/opengraph/objects/#retrieve

  GET / me / {namespace}:{action-type} / {object-type} 

现在,在元数据中 foursquare场地页面的一个我找到了 playfoursquare:venue的og:类型。



到目前为止,我怀疑我是命名空间对象类型。我只是简短而又是 action-type



来自Facebook上用户的Foursquare应用程序页面(http://www.facebook.com / [my_username] / app_playfoursquare)有很多对签到的引用,因此我对操作类型进行了假设,并得出以下结论:图api请求应为:

 我/ playfoursquare:{checkins,check-ins,check_ins} /地点

我尝试了上述所有 check in变体,它们都返回:


OAuthException-未知路径组件-2500


我不敢相信,这种侦探工作是确定Open Graph上另一个应用程序属性的最佳方法。我想我缺少明显的东西。



无论哪种方式,任何人都可以在这里提供的帮助,我将不胜感激。我有点茫然。



谢谢,
Gfte

解决方案

是的,目前,它很容易找到另一个应用程序的名称空间(检查一些html,查看URL)-无法找到另一个应用程序使用的动作名称-您必须猜测。 / p>

但是对于Foursquare,我自己进行了一些试验和错误之后,我已经能够确定他们当前的操作在以下URL上是GET-able的:

  https://graph.facebook.com/me/playfoursquare:checkin_to?access_token=令牌
https://graph.facebook .com / me / playfoursquare:became_the_mayor_of?access_token =令牌
https://graph.facebook.com/me/playfoursquare:unlock?access_token=令牌

一旦您拥有 user_actions:playfoursquare 和/或 friends_actions:playfoursquare 权限。


I am trying to retrieve a user's foursquare checkin data that is published using the open graph to Facebook. I am generally having trouble finding information (namespace, action-types and object-types) about an application that I do not own.

So far my application has successfully asked the user for (what I believe are) the appropriate permissions to access data that they have submitted to the foursquare FB application:

user_actions:playfoursquare

I found 'playfoursquare' from the url when I visit a foursquare application page in the new timeline:

http://www.facebook.com/[my_username]/app_playfoursquare 

Now I am trying to query the Graph Api using a url with the following structure: (ref: http://developers.facebook.com/docs/opengraph/objects/#retrieve)

GET /me/{namespace}:{action-type}/{object-type}

Now, in the meta data of a foursquare venue page I found a og:type of 'playfoursquare:venue'.

So far I have what I suspect are the namespace and object-type. I'm just short and action-type.

From a user's foursquare application page on Facebook (http://www.facebook.com/[my_username]/app_playfoursquare) there is a lot of references to 'check-ins' so I have made an assumption about the action-type and concluded that the graph api request should be:

me/playfoursquare:{checkins,check-ins,check_ins}/venue 

I tried all above variations of 'check in' and they all return:

OAuthException - Unknown path component - 2500

I can't believe that this detective work is the best way to determine the properties of another application on the Open Graph. I guess I am missing something obvious.

Either way I would appreciate any help anyone can offer here. I'm at a bit of a loss.

Thanks, Gfte

解决方案

Yes, currently, while its easy to find the namespace of another application (inspect some html, look at URLs) - its not possible to find the action names used by another app - you have to guess.

But for Foursquare, after doing some trial and error myself, I've been able to determine that their current actions are GET-able at the following URLs:

https://graph.facebook.com/me/playfoursquare:checkin_to?access_token=TOKEN
https://graph.facebook.com/me/playfoursquare:became_the_mayor_of?access_token=TOKEN
https://graph.facebook.com/me/playfoursquare:unlock?access_token=TOKEN

once you have the user_actions:playfoursquare and/or friends_actions:playfoursquare permissions.

这篇关于Facebook Open Graph API-动作类型和另一个应用程序的对象类型(foursquare)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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