Facebook Profile Photo

Discussion and feedback on Construct 2

Post » Fri Dec 09, 2011 5:13 pm

Are there plans to add that to the Facebook plugin? I would love to get the current profile photo to add to the game HUD.
B
4
G
2
Posts: 12
Reputation: 1,249

Post » Fri Dec 09, 2011 10:22 pm

(not sure if this will work)

go to this link below and download the plugin 'Load image from URL at runtime'

http://www.scirra.com/forum/c2-plugin-and-behavior-list_topic45158.html

Then use the facebook plugin to get the user ID..

Then call this link https://graph.facebook.com/19292868552:

Replacing the id at the end,

once you have this data, you have access to there profile picture,

for this example -- http://profile.ak.fbcdn.net/hprofile-ak-ash2/276791_19292868552_1958181823_s.jpg"

So you would need to figure out how to get this link once the data is received from the first link..

Sorry if this was of no use to you, Im not sure of any other way to get it....
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Fri Dec 09, 2011 10:24 pm

Wait, https://graph.facebook.com/837220006/picture This gives you the picture apparently. Maybe you only need to replace the ID and then pow! But let me know, because im interested too!
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Wed Jan 25, 2012 8:17 pm

I'll try that. Thanks.
B
4
G
2
Posts: 12
Reputation: 1,249

Post » Sun May 27, 2012 6:25 am

Hi Guys, I had a play with this, and the link smitchell provided works. But you have to use Zeroplusone's plugin instead, as Juanatar's doesn't work currently: http://www.scirra.com/forum/plugin-priteurl_topic51261_page1.html

Once you've added it, you can add the action:
spriteURL: "https://graph.facebook.com/" &facebook.UserID &"/picture"

You may have to turn off WebGL for this to work though
B
34
S
8
G
3
Posts: 328
Reputation: 7,692


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests