How do I get the total friend count in Unity from the Facebook API?Facebook API - How do I get a Facebook user's profile image through the Facebook API (without requiring the user to “Allow” the application)FaceBook API for friends countHow does Facebook disable the browser's integrated Developer Tools?Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my applicationhow to invite friend in facebook api to list friendsFacebook get friend list issue in UnityFacebook Api getting total count of friends, but not friends dataCallback function issues in FB.API for UnityWandering AI in unity C#How to get user names and pictures of people leaving comments on a Facebook page you manage?
the grammar about `adv adv` as 'too quickly'
How to describe a building set which is like LEGO without using the "LEGO" word?
Under what charges was this character executed in Game of Thrones, The Bells?
What information exactly does an instruction cache store?
Filter a data-frame and add a new column according to the given condition
Why does lemon juice reduce the "fish" odor of sea food — specifically fish?
Why does the headset man not get on the tractor?
How can I add a .pem private key fingerprint entry to known_hosts before connecting with ssh?
What is the correct pentalobe screwdriver size for a Macbook Air Model A1370?
Holding rent money for my friend which amounts to over $10k?
Find the unknown area, x
How does this Martian habitat 3D printer built for NASA work?
White foam around tubeless tires
Formal Definition of Dot Product
How do I adjust encounters to challenge my lycanthrope players without negating their cool new abilities?
Why didn't the Avengers use this object earlier?
"The van's really booking"
Given 0s on Assignments with suspected and dismissed cheating?
Is it safe to use two single-pole breakers for a 240 V circuit?
What was the ring Varys took off?
How to redirect stdout to a file, and stdout+stderr to another one?
Will casting a card from the graveyard with Flashback add a quest counter on Pyromancer Ascension?
Is this possible when it comes to the relations of P, NP, NP-Hard and NP-Complete?
Retest whole system or just changes with regression tests
How do I get the total friend count in Unity from the Facebook API?
Facebook API - How do I get a Facebook user's profile image through the Facebook API (without requiring the user to “Allow” the application)FaceBook API for friends countHow does Facebook disable the browser's integrated Developer Tools?Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my applicationhow to invite friend in facebook api to list friendsFacebook get friend list issue in UnityFacebook Api getting total count of friends, but not friends dataCallback function issues in FB.API for UnityWandering AI in unity C#How to get user names and pictures of people leaving comments on a Facebook page you manage?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
so I'm working with the Facebook API in Unity and I'm trying to get the total number of friends. I did manage to get the name and profile picture. I think I'm pretty far already but it's just that line of code that I'm missing in order for it to work.
public class FbScript : MonoBehaviour
public GameObject FullName;
public GameObject NumFriends;
void DealWithFBMenus(bool isLoggedIn)
if (isLoggedIn)
DialogLoggedIn.SetActive(true);
DialogLoggedOut.SetActive(false);
FB.API("/me/picture?type=square&height=128&width=128", HttpMethod.GET, DisplayProfilePic);
FB.API("/me?fields=name", HttpMethod.GET, DisplayUsername);
FB.API("/me?fields=first_name", HttpMethod.GET, DisplayFirstUsername);
FB.API("/me/friends?summary=total_count", HttpMethod.GET, DisplayFriends);
foreach (string perm in AccessToken.CurrentAccessToken.Permissions)
// log each granted permission
Debug.Log(perm);
else
DialogLoggedIn.SetActive(false);
DialogLoggedOut.SetActive(true);
void DisplayUsername(IResult result)
Text Username = FullName.GetComponent<Text>();
if (result.Error == null)
Username.text = "" + result.ResultDictionary["name"];
else
Debug.Log(result.Error);
void DisplayFriends(IGraphResult result)
if (result.Error == null)
Text Friends = NumFriends.GetComponent<Text>();
Friends.text = "Friends:, " + result.ResultDictionary["total_count"];
else
Debug.Log(result.Error);
}
facebook api unity3d
add a comment |
so I'm working with the Facebook API in Unity and I'm trying to get the total number of friends. I did manage to get the name and profile picture. I think I'm pretty far already but it's just that line of code that I'm missing in order for it to work.
public class FbScript : MonoBehaviour
public GameObject FullName;
public GameObject NumFriends;
void DealWithFBMenus(bool isLoggedIn)
if (isLoggedIn)
DialogLoggedIn.SetActive(true);
DialogLoggedOut.SetActive(false);
FB.API("/me/picture?type=square&height=128&width=128", HttpMethod.GET, DisplayProfilePic);
FB.API("/me?fields=name", HttpMethod.GET, DisplayUsername);
FB.API("/me?fields=first_name", HttpMethod.GET, DisplayFirstUsername);
FB.API("/me/friends?summary=total_count", HttpMethod.GET, DisplayFriends);
foreach (string perm in AccessToken.CurrentAccessToken.Permissions)
// log each granted permission
Debug.Log(perm);
else
DialogLoggedIn.SetActive(false);
DialogLoggedOut.SetActive(true);
void DisplayUsername(IResult result)
Text Username = FullName.GetComponent<Text>();
if (result.Error == null)
Username.text = "" + result.ResultDictionary["name"];
else
Debug.Log(result.Error);
void DisplayFriends(IGraphResult result)
if (result.Error == null)
Text Friends = NumFriends.GetComponent<Text>();
Friends.text = "Friends:, " + result.ResultDictionary["total_count"];
else
Debug.Log(result.Error);
}
facebook api unity3d
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)
– 04FS
Mar 25 at 7:23
add a comment |
so I'm working with the Facebook API in Unity and I'm trying to get the total number of friends. I did manage to get the name and profile picture. I think I'm pretty far already but it's just that line of code that I'm missing in order for it to work.
public class FbScript : MonoBehaviour
public GameObject FullName;
public GameObject NumFriends;
void DealWithFBMenus(bool isLoggedIn)
if (isLoggedIn)
DialogLoggedIn.SetActive(true);
DialogLoggedOut.SetActive(false);
FB.API("/me/picture?type=square&height=128&width=128", HttpMethod.GET, DisplayProfilePic);
FB.API("/me?fields=name", HttpMethod.GET, DisplayUsername);
FB.API("/me?fields=first_name", HttpMethod.GET, DisplayFirstUsername);
FB.API("/me/friends?summary=total_count", HttpMethod.GET, DisplayFriends);
foreach (string perm in AccessToken.CurrentAccessToken.Permissions)
// log each granted permission
Debug.Log(perm);
else
DialogLoggedIn.SetActive(false);
DialogLoggedOut.SetActive(true);
void DisplayUsername(IResult result)
Text Username = FullName.GetComponent<Text>();
if (result.Error == null)
Username.text = "" + result.ResultDictionary["name"];
else
Debug.Log(result.Error);
void DisplayFriends(IGraphResult result)
if (result.Error == null)
Text Friends = NumFriends.GetComponent<Text>();
Friends.text = "Friends:, " + result.ResultDictionary["total_count"];
else
Debug.Log(result.Error);
}
facebook api unity3d
so I'm working with the Facebook API in Unity and I'm trying to get the total number of friends. I did manage to get the name and profile picture. I think I'm pretty far already but it's just that line of code that I'm missing in order for it to work.
public class FbScript : MonoBehaviour
public GameObject FullName;
public GameObject NumFriends;
void DealWithFBMenus(bool isLoggedIn)
if (isLoggedIn)
DialogLoggedIn.SetActive(true);
DialogLoggedOut.SetActive(false);
FB.API("/me/picture?type=square&height=128&width=128", HttpMethod.GET, DisplayProfilePic);
FB.API("/me?fields=name", HttpMethod.GET, DisplayUsername);
FB.API("/me?fields=first_name", HttpMethod.GET, DisplayFirstUsername);
FB.API("/me/friends?summary=total_count", HttpMethod.GET, DisplayFriends);
foreach (string perm in AccessToken.CurrentAccessToken.Permissions)
// log each granted permission
Debug.Log(perm);
else
DialogLoggedIn.SetActive(false);
DialogLoggedOut.SetActive(true);
void DisplayUsername(IResult result)
Text Username = FullName.GetComponent<Text>();
if (result.Error == null)
Username.text = "" + result.ResultDictionary["name"];
else
Debug.Log(result.Error);
void DisplayFriends(IGraphResult result)
if (result.Error == null)
Text Friends = NumFriends.GetComponent<Text>();
Friends.text = "Friends:, " + result.ResultDictionary["total_count"];
else
Debug.Log(result.Error);
}
facebook api unity3d
facebook api unity3d
edited Mar 25 at 9:50
gmaziashvili
19711
19711
asked Mar 23 at 14:41
DaanWDaanW
1
1
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)
– 04FS
Mar 25 at 7:23
add a comment |
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)
– 04FS
Mar 25 at 7:23
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)– 04FS
Mar 25 at 7:23
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)– 04FS
Mar 25 at 7:23
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314872%2fhow-do-i-get-the-total-friend-count-in-unity-from-the-facebook-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314872%2fhow-do-i-get-the-total-friend-count-in-unity-from-the-facebook-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
total_count
is not on the first level of the data structure like “simple” fields such as name/first_name. Go make your request in Graph API Explorer first, if you are unsure about what structure is returned. (Also, maybe go look up Field Expansion - this doesn’t need four separate, time-consuming API requests, but can be done in one.)– 04FS
Mar 25 at 7:23