如何获取公司Facebook帐户的用户名/名称? [英] How to obtain username/name for a company facebook account?

查看:594
本文介绍了如何获取公司Facebook帐户的用户名/名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我正在使用图形API资源管理器,并且我拥有一个公司类型的Facebook帐户. 但是,以下命令不会返回用户名"/名称"字段. 我确实在个人资料"页面->基本信息->名称/用户名(两者)中都设置了正确的用户名

Right now I am using the graph API explorer and I have a company type Facebook account. However, the following command do not return "username"/"name" field. I did set a proper username in the Profile page -> Basic Information -> Name/Username (both)

http://graph.facebook.com/11234545656556 (该号码目前为假)

这是我收到的回复:

{"id": "11234545656556",   
 "link": "http://www.facebook.com/profile.php?id=11234545656556",   
 "timezone": 0,   
 "locale": "en_US",   
 "verified": true,   
 "updated_time": "2012-05-31T22:32:52+0000",   
 "type": "user"}

但是,如果我查询自己的个人帐户,则会收到预期的答复:

However if I query my own individual account, I received the expected response:

{"id": "11234512345",
 "name": "John Doe",
 "first_name": "John",
 "last_name": "Doe",
 "link": "http://www.facebook.com/people/John-Doe/11234512345",
 "gender": "male",
 "locale": "en_US"}

那我该怎么做才能获得公司帐户的用户名/名称?

So what can I do to obtain the username/name for the company accounts?

推荐答案

企业帐户无法正确使用API​​,并且没有名称或用户名. 它们存在于Facebook上,专门用于管理页面和应用程序-它们应该可以与Pages和Ads API很好地配合使用,但是该API中的其他大多数调用都将不起作用(例如,它们也没有性别,朋友,帖子等)

Business accounts don't work properly with the API and they don't have names or usernames. They exist on Facebook specifically for managing pages and apps - they should work with the Pages and Ads APIs just fine, but most other calls in the API will not work (for example, they also don't have gender, friends, posts, etc)

如果您谈论的是页面,则对它们的访问方式有所不同-有关详细信息,请参见页面登录文档-

If you're talking about a Page, those are accessed differently - see the Page login documentation for details - https://developers.facebook.com/docs/howtos/login/login-as-page/

具体来说,您授权具有manage_pages权限的应用,并且可以对/me/accounts进行API调用以获取访问令牌,然后您可以使用该令牌来代表页面

Specifically, you authorise an app with the manage_pages permission and you can make an API call to /me/accounts to get an access token which you can then use to act on behalf of the page

这篇关于如何获取公司Facebook帐户的用户名/名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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