Page 1 of 2

Profile Picture Facebook API

Posted: Sun Jun 22, 2014 2:00 pm
by Halimz

Hello

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

Image

Please help me :)


Profile Picture Facebook API

Posted: Sun Jun 22, 2014 2:37 pm
by obullei

Hi Halimz,

We need to clarify this point with our developers.


Profile Picture Facebook API

Posted: Sun Jun 22, 2014 11:57 pm
by Yurii Orishchuk

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.


Profile Picture Facebook API

Posted: Mon Jun 23, 2014 1:29 pm
by Halimz

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


Profile Picture Facebook API

Posted: Mon Jun 23, 2014 6:08 pm
by Evgene Karachevtsev

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


Profile Picture Facebook API

Posted: Mon Oct 20, 2014 6:06 am
by Rafael Biton

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


Profile Picture Facebook API

Posted: Mon Oct 20, 2014 6:37 am
by Evgene Karachevtsev

Hello Rafael,

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


Profile Picture Facebook API

Posted: Mon Oct 20, 2014 10:29 pm
by Rafael Biton

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


Profile Picture Facebook API

Posted: Mon Oct 20, 2014 10:29 pm
by Rafael Biton

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


Profile Picture Facebook API

Posted: Mon Oct 27, 2014 6:23 pm
by Rafael Biton

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