问题标签 [facebook-graph-api-v2.2]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
facebook - 无法使用 Facebook api 2.0 获取新的应用范围用户 ID
最近我将旧的 v1.0 Facebook web 应用程序更新为 api v2.0,我根据 Facebook 的升级指南更改了 SDK 调用,然后我创建了一个新的 facebook 帐户来登录我的应用程序,当我打电话给我/它仍然返回全局用户 ID,而不是新的应用范围 ID。
有什么我做错了吗?我还在 iPhone sdk 上尝试过,它确实返回了新的应用程序范围 ID。
非常感谢。
以下是我调用 api 的方式:
facebook - Facebook 帖子对象
我正在使用 Facebook 广告 API。并以 %PageID%_%PostID% 的形式接收 AdCreative 的属性 object_story_id。
然后我可以从 FB API 获得两个对象:
- 第一个使用该 URI:https ://graph.facebook.com/v2.2/%PostID%
- 第二个使用https://graph.facebook.com/v2.2/%PageID%_%PostID%
所以在这里我有几个问题:
为什么有两个不同的对象,它们不代表相同的逻辑结构吗?
为什么有时我可以访问第一个,但不能 - 第二个?
facebook - Graph Api查询好友地址
是否可以使用 Graph Api 2.2(无 Fql)查询我朋友的当前地址?
我已经试过了
但它只返回了我朋友的 ID,而不是他们的地址。
facebook - Facebook Graph API: Find graph object from post URL
Given the URL of a public Facebook post, how can one find the post object in the FB Graph API? (secondarily, why are so many user feeds empty or nearly empty when accessed through the API?)
We would like to be able to comment on or like a post via the v2.x Graph API, given the post's URL. Doing so requires the post's object ID, which we can make some educated guesses about, but accessing the actual object through the API has proven unreliable (works for some posts but not others).
v2 of the API introduced app-scoped user IDs, and post IDs generally seem to be of the form {app-scoped user id}_{unique post id}. Here are the details of some attempts to find posts in the API with various combinations of these IDs (global user id, app-scoped user id, and post id).
Starting with a simple example: https://www.facebook.com/evan.prodromou/posts/10153023417510505. Key characteristics are that it's public, it's not a share of another post, and most importantly it has no photo(s), which add extra ids and URLs for the individual photo(s) and photo set. Evan's profile is also public, i.e. https://www.facebook.com/evan.prodromou doesn't show the generic This content is currently unavailable
Trying the bare post id from that URL, /v1.0/10153023417510505 and /v2.2/10153023417510505 both give the Unsupported get request (code 100) error.
Evan's global user id is 525575504. Attaching that as a prefix, /v1.0/525575504_10153023417510505 and /v2.2/525575504_10153023417510505 still both give the same Unsupported get request error.
Same error using his app-scoped user id instead, /v2.2/10152350676805505_10153023417510505.
OK let's try the other direction. We'll page through the user's feed until we find the post in question. It feels like this is more the expected use case for the API...
Both the global /v2.2/525575504/posts and app-scoped /v2.2/10152350676805505/posts return nothing, but /v1.0/525575504/posts returns two recent posts, this like and this post. Not sure why only those two, even though has plenty of other recent public posts. The like is fetchable via its
id
field in both api versions, i.e. /v1.0/525575504_10153045879215505 and /v2.2/10152350676805505_10153045879215505, but both API versions return the Unsupported get request error when fetching the post via its id field, e.g. /v1.0/525575504_351575675029953 and /v2.2/10152350676805505_351575675029953Trying another public post, this one with pictures: https://www.facebook.com/andigalpern/posts/678121182314631 . /v1.0/100003502653187_678121182314631, /v2.2/100003502653187_678121182314631, and /v2.2/499657186827699_678121182314631 all error.
/v1.0/100003502653187/posts only includes one post, a like, and /v2.2/100003502653187/posts is empty.
For reference, here is the GitHub issue where we have been tracking this problem.
php - 作为另一个页面发布到页面 - Facebook API
我希望将我的应用程序发布到非拥有页面作为用户拥有的页面之一(拥有的页面发布到非拥有页面的提要)。
如果您作为页面登录 Facebook,您可以在桌面平台上执行此操作。但是,我的试验(和搜索)返回“不可能”通过 Facebook Graph API 执行。
特别是当我执行以下 POST 时:
我收到以下来自 FB 的回复:
(#200) 演员为页面的帖子也不能包含除 EVENT 或 GROUP 之外的 target_id\n
发布到事件或组有效,但不允许我发布到目标页面。
任何解决方法?很难理解您可以在桌面门户上完成,但不能通过 API
提前致谢!
facebook-fql - 如何为此请求替换 v2.2 中的 fql?
如何使用 graph api v2.2 检索粉丝页面的评论?
实际上,我使用 FQL 来检索自某个日期以来在页面中最后更新的帖子的评论。为此,我在请求的过滤器中使用 update_date。
Fql 将在 V2.2 中过时。我如何用图形 api 代替它?
非常感谢您的帮助。
雷达。
facebook - 使用图形 API 在 Facebook 粉丝页面上上传视频时出错
我有一个 android 应用程序,我需要将视频从我的应用程序上传到 facebook 粉丝页面。
我成功发布图片但无法上传视频。它总是给出错误响应,例如: {Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 352, errorType: OAuthException, errorMessage: (#352) 抱歉,您选择的视频文件格式我们不支持。}, isFromCache:false}
我曾尝试以不同的格式上传,如 3gp、mp4 等,但没有运气!
我做了什么来上传图片
此代码非常适合上传图像。
我为上传视频做了什么
我错过了什么吗?
它总是说“对不起,您选择的视频文件的格式我们不支持。”
facebook - 如何显示旧的 FB 应用评论提交?
去年,我们提交了一个 Facebook 应用程序进行审核,并且我们对 user_likes 的使用被批准为一个项目。我没有记录我用来描述我们如何使用 user_likes 的文本。现在我需要为不同的客户提交一个非常相似的应用程序。有没有办法挖掘出旧的审批表内容?
facebook - 无法在 facebook 业务管理器中添加广告帐户
我创建了一个业务经理并连接了一个访问级别为开发的应用程序。创建一个广告帐户。当我尝试创建另一个时,我收到以下消息:
“您已达到与此 Business Manager 帐户关联的最大广告帐户数量。此限制有助于防止潜在的违规和欺诈行为。如果您需要添加更多广告帐户,请从 Facebook 联系您的代表或单击齿轮图标并告知我们关于这个问题。 ”
当我尝试通过 api 创建广告帐户时,api 返回以下响应:
你能解释一下为什么我不能创建一个新帐户,虽然是开发级别的访问,你可以创建 5 个广告帐户?是否可以在没有业务经理的情况下创建广告帐户?广告帐户必须与真实的 facebook 用户关联?
我将不胜感激有关如何在 facebook 上管理广告帐户的说明
facebook - facebook graph api分页没有为朋友提供结果
我正在使用 graphi api 来检索我朋友的姓名和 ID。在 Graphy API Explorer 中,我使用查询
me/friends?fields=id,name
它在第一页给了我 25 个结果,在分页部分有一个下一页。当我尝试获取下一页时。它返回给我一个空页面。尽管我的个人资料中有 600 多个朋友。我应该设置什么偏移量和限制并不重要,除了前 25 个结果之外,它永远不会给出结果。