-3

I have a big problem. I would like to do a facebook app that, when I click the button "Begin test", search on my friends list. For example I would like to create a test called "What's your best friend?" and when I click on the button it give me the name of a random friend of mine. I really don't know how to do it, I searched on differents sites but I still have no answers. Here you are an example: http://it.nametests.com/test/chi-delle-tue-amiche-e-la-tua-fata-turchina/6382/

Thanks!

  • Firstly, please get familiar with graph API and the process of getting access to friendlist using access tokens of users. Afterwards, once you are able to get infomation about friends, you can write a function to get a random name from the list. More information on developers.facebook.com – Coke Mar 26 '16 at 11:51

1 Answers1

0

It is not possible anymore, you can only get access to friends who authorized your App too. More information: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

The API call would be /me/friends.

Btw, i would consider those Apps "Spam Apps" - you don´t REALLY get your "best friend", you just get a random one. There´s no logic behind it. You should not create even more of those Spam Apps.

Also, Stackoverflow is a platform for developers, you should always do some research/testing/programming/debugging before asking a question: https://stackoverflow.com/tour

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • But if it's not possible anymore, why the app in the example still running? – F. Grasso Mar 26 '16 at 15:17
  • what exactly does the app do? i don't want to authorize it, those apps are often malicious. it is possible that they are using taggable_friends or invitable_friends - which would not be allowed if you don't want to tag or invite users. – andyrandy Mar 26 '16 at 21:22
  • The app, when you click the button, pick a random friends of your friends list of facebook. Then the selected friend has shown as "your fairy friend" – F. Grasso Mar 29 '16 at 08:50
  • classic spam app then. either way, most likely using an api endpoint that is not allowed for the case. – andyrandy Mar 29 '16 at 09:09