Halimz
Posts: 0
Joined: Sun Jun 22, 2014 8:46 am

Profile Picture Facebook API

Hello

Facebook API: How can I get a user's Facebook profile picture that is in a shape of circular ?

Image

Please help me :)

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Profile Picture Facebook API

Hi Halimz,

We need to clarify this point with our developers.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Profile Picture Facebook API

Hi Halimz.

You can do it with background image and some other styles for the container.

Please use following solution:

1 Add HTML component on the page.

2 Set dimensions for this component as "100px" and "100px" http://prntscr.com/3vipe5/direct

3 Create CSS Asset and fill it with following code: http://prntscr.com/3virea/direct

pre

.yourHtmlComponent{
/* here you should set your goal url */
background-image: url(../../../../files/views/assets/image/phone.png);

Code: Select all

 background-size: cover; 

 /* this value should be half of the dimension(200/2 = 100) */ 
 border-radius: 100px; 

}

/pre

4 When your image is dynamic you can set this background property with following code:

pre

//Note you should replace "yourHTMLComponentName" with your one.
Apperyio("yourHTMLComponentName").css("background-image", "http://www.aneco.ru/images/stories/bengalskiitigr08032011.jpg");

/pre

Regards.

Halimz
Posts: 0
Joined: Sun Jun 22, 2014 8:46 am

Profile Picture Facebook API

Thank you Yurii Orishchuk
One more thing how can i mapping it?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Profile Picture Facebook API

Halimz,

If you use this tutorial:
http://devcenter.appery.io/documentat...
You should do the following:
add image component on the page Facebook_Me: http://www.screencast.com/t/1Zgju7d6Y
add mapping of parameter id in asset for this image: http://www.screencast.com/t/ieyRPOJ01D4R
and to add such JS: http://www.screencast.com/t/zsc8ZYCn

codereturn "https://graph.facebook.com/" +value+ "/picture&quot/code

Rafael Biton
Posts: 0
Joined: Sat Oct 11, 2014 9:03 pm

Profile Picture Facebook API

Hi Evgene

I am sorry about that, but where I add this JS script?

I puted it in sucess event from Facebook_MeService, BUT the image can ́t appear.

See the print.

Thank you

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Profile Picture Facebook API

Hello Rafael,

You should add this code in the mapping, not on success event.

Rafael Biton
Posts: 0
Joined: Sat Oct 11, 2014 9:03 pm

Profile Picture Facebook API

Evgene Thank you for your reply and I am sorry, I am new in App yo, I can't understand where I should put the code....If you can help me.
Thank you

Rafael Biton
Posts: 0
Joined: Sat Oct 11, 2014 9:03 pm

Profile Picture Facebook API

Eugene Thank you for your reply now I got It!! Thank you so much

Rafael Biton
Posts: 0
Joined: Sat Oct 11, 2014 9:03 pm

Profile Picture Facebook API

Yurii, I am sorry about that but I have a doubt.

I did a simple login page and the response returns the URL of picture user profile.

I save the json return with the URL of the image profile in a storage location.

How can I assign the value of the storage location (which is a URL for the image) to the example you wrote above HTML component?

I tried to use the example but the image does not appear, only appears when I put straight in css (background-image: url (http: //imagem.jpg);)

Thank you

Return to “Issues”