简体   繁体   English

Facebook 中的用户好友权限

[英]User Friends permission in Facebook

I'm trying to add user_friends permission from facebook in my app.我正在尝试在我的应用程序中添加来自 facebook 的 user_friends 权限。 But I'm unable to test this feature cause i'm unable to get user_friends permission for test users.但我无法测试此功能,因为我无法获得测试用户的 user_friends 权限。

I have tested my feature on test-app and with it's test users.我已经在 test-app 和它的测试用户上测试了我的功能。 But while submitting it to facebook (for review) we need to upload actual app not test app.但是在将其提交到 facebook(以供审核)时,我们需要上传实际的应用程序而不是测试应用程序。 And on actual prod app test users I'm unable to test friends feature.对于实际的 prod 应用测试用户,我无法测试好友功能。

I tried to update test users permission in prod app dashboard but it's not showing user_friends permission in list.我试图在 prod 应用仪表板中更新测试用户权限,但它没有在列表中显示 user_friends 权限。

Can someone pls help in how we can test these permission in actual prod app before submitting?有人可以帮助我们在提交之前如何在实际的 prod 应用程序中测试这些权限吗?

1.check your app is "Developmet Mode" on facebook developer Page.(very important) 1.在facebook开发者页面上检查您的应用程序是否为"Developmet Mode" 。(非常重要)

2.using Role > Test user build two Role. 2.using Role > Test user 建立两个Role。 (Authorize Test Users for This App Set Yes) (为此应用集授权测试用户是)

3.add Permission user_friends (Only appear on "Development Mode" or review passed) 3.添加权限user_friends (仅出现在“开发模式”或审核通过)

4.choice edit > Manage_Friend > Add_friend . 4.选择edit > Manage_Friend > Add_friend

5.try two test user and report to me. 5.尝试两个测试用户并报告给我。

It seems waht you see, is because today, by using user_friends permission, you will receive only the user friends who already using the app.看起来你看到了,因为今天,通过使用user_friends权限,您将只收到已经使用该应用程序的用户朋友。 Not all the friends.不是所有的朋友。

Grants an app permission to access a list of friends that also use said app.授予应用访问也使用该应用的朋友列表的权限。 This permission is restricted to a limited set of partners and usage requires prior approval by Facebook.此权限仅限于一组有限的合作伙伴,使用需要事先获得 Facebook 的批准。

https://developers.facebook.com/docs/facebook-login/permissions/#reference-user_friends https://developers.facebook.com/docs/facebook-login/permissions/#reference-user_friends

For those users you will not get the real Facebook UID, only a scoped UID for your app.对于这些用户,您将不会获得真正的 Facebook UID,只会获得您应用的范围 UID。

In my case the solution was - in the Test User Accounts list to click the dots in the options column next to each test user, select Change permissions granted to this app , and add user_friends to the permissions.在我的情况下,解决方案是 - 在测试用户帐户列表中单击每个测试用户旁边选项列中的点,选择Change permissions granted to this app的权限,并将user_friends添加到权限中。 This had to be done for each test user, to get their friends list in the app.这必须为每个测试用户完成,以在应用程序中获取他们的朋友列表。

Interestingly the api should only return the friends who are also registered to app.有趣的是,api 应该只返回也注册到 app 的朋友。 In case of test users it returned all of their friends for some reason...如果是测试用户,它出于某种原因返回了他们所有的朋友......

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM