Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by poming.lam · Mar 13, 2016 at 12:18 AM · facebookrequestbad

HELP! 400 Bad Request on me/invitable_friends

Hi all,

I've been searching around and tried many things for many days now, I haven't been able to get through this problem.

I get "400 Bad Request" when I try to call "me/invitable_friends" like this:

FB.API("me/invitable_friends", Facebook.HttpMethod.GET, CallBackLoadInvitableFriends); function void CallBackLoadInvitableFriends(FBResult result) { Debug.Log(result.Text); }

I'm on Unity 4.7.1, Facebook SDK for Unity 6.2.2. I'm using the access token to login, it logs in. This FB app is in the "Games" category and I believe this has the required "Canvas", although I'd like to know how I can confirm that I have the "Canvas" requirement.

==

I tried to get "friends" instead and it gave me some results, but I don't understand why the data is empty and the count is 12, if I have 12 in "total_count", am I not suppose to have 12 records in the data?

FB.API("me/friends", Facebook.HttpMethod.GET, CallBackLoadInvitableFriends); function void CallBackLoadInvitableFriends(FBResult result) { Debug.Log(result.Text); }

Result: {"data":[],"summary":{"total_count":12}}

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NoseKills · Mar 13, 2016 at 12:06 PM 0
Share

Which platform? As i remember initable friends only works if you have set up a FB canvas app. I guess it's just facebook's way of driving people into making FB versions of their games.

Edit: yup it's still so

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by phil_me_up · Mar 13, 2016 at 01:43 PM

Mobile games, despite what you might think, aren't supposed to use the invitable_friends graph calls unless you also have a canvas app.

A Canvas App is basically web version of your game running in the browser. If you have this, you can then use invitable_friends on the mobile platform as well as in the canvas app.

However, you can (or at least used to be able to - they may have changed it), trick Facebook into allowing mobile applications to use invitable_friends by providing a canvas app URL which could possibly just point to your website or an appropriate download location for your app. You set this in the Facebook App settings within the developer portal.

Newer versions of the Facebook SDK include additional App Links for inviting friends - it's not a list of friends but it does allow you to invite friends (without the need to be logged into Facebook through your game too, which is an advantage). As you're using Unity 4 still, these may not be available to you.

Remember that you also need to request the user_friends permission from facebook. This is a common request now so shouldn't cause your users any concern.

As to why you're getting no data in the me/friends data, I'm not sure. I've not seen this before but again, I'd check that you actually have the user_friends permission and that you are using an appropriate login account (you may need to setup your Test users in the facebook developer portal for this app).

Also, make sure your app is set as a 'Game' in the facebook developer portal.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Ted-Bigham · Apr 03, 2017 at 06:51 PM

"me/friends" only returns friends that have already authorized the game. It won't do any good for sending invites.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Facebook Invitation Notification? 0 Answers

Facebook app invitation in android -1 Answers

UnityWebRequest.Post with MultipartFormDataSection returns Bad Request (400) 0 Answers

Transfer request to application on Facebook 1 Answer

Facebook app invitation in android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges