Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Facebook User profile picture

Author
Message
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 9th Jun 2013 17:49
I've been able to successfully use the facebook commands in Tier 1 to download the images of friends, but how do I download the user profile picture?

Thanks
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 10th Jun 2013 22:37 Edited at: 10th Jun 2013 22:42
The base URL is :

https://graph.facebook.com/User_ID/picture

(The User ID from the FacebookGetUserID() AppGameKit command

but it only works in a Browser capable of redirect.

For my case in AppGameKit, i'm parsing the result of :

https://graph.facebook.com/User_ID/picture?redirect=false

Which gives you the real URL in JSON Format. You have just to download it via this URL

. (and it's right that this command misses : GetMyFBPicture() (lol) ... Paul ? )

.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 10th Jun 2013 22:47
Here is my code (look at the UCF for the ReplaceString function ... And the NetGetString is just a function that create a http connection and retrieves the result string (all in one func) ... :

Hope this helps


.
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 11th Jun 2013 10:04
Thanks for the help, much appreciated!

It would be cool to get this added as a command. Seems like an oversight that it's missing.
Auger
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location: Out There
Posted: 12th Jun 2013 01:55
yeah I second that... in fact I'd rather get the User photo then his friends anyways.


Auger

Login to post a reply

Server time is: 2024-05-02 21:42:33
Your offset time is: 2024-05-02 21:42:33