Shlomi Schwartz
Shlomi Schwartz

Reputation: 8913

Facebook - Is it possible to retrieve user public profile picture without creating an application?

To clarify: I'm using the open graph meta tags (og:video etc') to create a link that when shared will display an alternate content, in my case a small flash widget. something like this (soundcloud.com)

I used facebook tool to debug my link and the share part works fine.

My question is: can I get the src for the user profile picture on the page where the widget was shared on?

Upvotes: 1

Views: 1202

Answers (3)

David Lackey
David Lackey

Reputation: 33

It may not answer your question, but to get a facebook user's profile picture use the following url format http://graph.facebook.com/_facebook_user_id_or_facebook_user_name_/picture

So as long as you have a facebook user id or user name (through scraping or other means) you could generate an image src.

Upvotes: 0

Hologos
Hologos

Reputation: 407

From Facebook doc:

You can render the current profile photo for any object by adding the suffix /picture to the object URL. For example, this will render your public profile photo:

<img src="https://graph.facebook.com/username_or_uid/picture"/>

You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height): https://graph.facebook.com/username_or_uid/picture?type=large.

Upvotes: 1

Cay
Cay

Reputation: 3794

The profile picture is a public object, and you can retrieve it like this:
http://graph.facebook.com/USERID/picture
e.g:
http://graph.facebook.com/shlomi.schwartz/picture

Upvotes: 2

Related Questions