Facebook SDK -> Graph API from an android app and an IOS app. The functions I use in facebook-cor..." /> Facebook SDK -> Graph API from an android app and an IOS app. The functions I use in facebook-cor..." /> Facebook SDK -> Graph API from an android app and an IOS app. The functions I use in facebook-cor..."/>

Can a posting from a facebook app to a users timeline contain images?

548 Views Asked by At

I am using facebook-cordova -> "Simple Facebook" -> Facebook SDK -> Graph API from an android app and an IOS app.

The functions I use in facebook-cordova to do the actual postings are named .feed() and .share(). They seems to be interchangeable on android i.e. result in the same graph api call in the other end.

What I need is to add images to a posting, preferrably by url.

(I have already managed to do postings without images, using app key and access token etc),

When glancing the facebook SDK for android, it seems there is no obvious way to add images to a status message.

On the other hand, it is possible, right?

1

There are 1 best solutions below

8
On BEST ANSWER

The usual way to do this is to post a photo:

https://developers.facebook.com/docs/graph-api/reference/v2.1/user/photos

Of course the same rules apply to the message parameter, no prefilling is allowed, the value must be 100% user generated.

How to do this with Cordova should be explained here: Phonegap/Cordova Upload photo to graph.facebook - requires upload file

Remember that every photo in your profile is in an album: https://www.facebook.com//photos_albums

Afaik you can upload photos to every album except for the profile pictures.