Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Cover Photo API using PHP

Has Facebook released any api for facebook cover photo? I want to implement it using PHP language.

EDIT

I want to upload cover photo in facebook timeline using graph api PHP

like image 911
Kamini Avatar asked Apr 10 '12 08:04

Kamini


People also ask

Can a Facebook cover photo be clickable?

Your cover photo is “clickable,” as is the photo in your library. So in the photo's description, you can add copy to direct users to your freebie (via your data capture tool). In funnel marketing terms, that freebie is known as a lead magnet.

How can I make my Facebook cover photo responsive?

You can easily do this using a free tool we love – Canva by selecting “Use Custom Dimensions”. Use these dimensions for optimal viewing on both mobile and desktop for your Facebook Cover Image. NOTE: You will want to be mindful of anything placed in the top and bottom sections for optimal desktop viewing.

Can you use a PNG for Facebook cover photo?

For profile pictures and cover photos with your logo or text, you may get a better result by using a PNG file. Keep in mind that your Page's profile picture will be cropped to a circular shape in ads and posts, but will remain the same square shape when people visit your Page.

How do I make a Facebook cover photo in Photoshop?

Select File > New. Name the file “cover-photo.” Set the width to 851 pixels, the height to 315 pixels, and resolution to 72 pixels/inch. These are the minimum dimensions for a cover photo on Facebook. This allows you to design your cover photo in Photoshop without guessing how it will appear on Facebook.


3 Answers

There is an api for updating the cover photo on a page

http://developers.facebook.com/docs/reference/api/page/

It asks for a photo id which i guess is the id of a photo from the users album.

like image 133
diEcho Avatar answered Oct 19 '22 22:10

diEcho


Actually, it is not possible to change the profile picture directly via Facebook Photo Graph API as no section mention about that.

However, we can do a trick by uploading user’s photo to Facebook via the API then redirect the user to uploaded photo URL with 1 added in querystring parameter as below:

http://www.facebook.com/photo.php?pid=xyz&id=abc&makeprofile=1

“&makeprofile=1″ is the main thing here and xyz/abc will be returned by Facebook. By adding the parameter, Facebook will auto change the profile picture of the current user with the uploaded picture above.

For more info: http://4rapiddev.com/facebook-graph-api/php-change-facebook-profile-picture-with-graph-api/

like image 33
Madan Avatar answered Oct 19 '22 22:10

Madan


You can upload photo to an album via graph api. Get the new photo id and redirect user to this url

 "http://www.facebook.com/profile.php?preview_cover=" + photo_id

before that, you should inform the user that he/she will be redirected to facebook to page where they can set new cover photo (they need to confirm the change, click the save button). It's not perfect solution, and not fully covered api but it's best way out there asfaik.

like image 1
Grzegorz Dębiński Avatar answered Oct 19 '22 22:10

Grzegorz Dębiński