I'm trying to post a picture to a feed using the graph API but this does not work if my image url does not have an image filename extension such as .png
(I have a URL to a png without the .png file extension as the image is created dynamically on the server)
This does seem to work when I manually post the link on my Facebook wall. Facebook wraps the URL like this:
http://external.ak.fbcdn.net/safe_image.php?d=AQAsdfyQsdfXvV5h59OP&w=90&h=90&url="my image url"
Does anyone know how I can post the URL of an image to the picture field of a feed post?
Facebook downloads and caches any image posted on the wall. It is then distributed on their CDN (content delivery network).
The reason is simple: load times. If someone posts an image from a slow server on FB, this could make experience of Facebook slow. So they copy all that.
So
maybe Facebook still has an old copy. Try with a fresh URL.
can facebook access the URL, or only your user?
Related
I want a reliable way of storing photos from the user_photos edge from facebook.
What is the most reliable way to keep our photos when we save them so they can be displayed without for example the facebook cdn url changing etc
I store the picture id and have tried using the facebook cdn urls but they go stale after a while, also
img src="http://graph.facebook.com/v4.0/pic_id_here"
Or
img src="http://graph.facebook.com/v4.0/pic_id_here/picture"
Or
img src="http://graph.facebook.com/v4.0/pic_id_here/picture?type=normal"
None of this seems to work.
I cannot find anything at all in facebook about anything really.
Either storing them server side or what is the correct url to link to in markup?
In my Unity IOS game, I am unsuccessfully trying to use FB.Feed to share a screenshot on the user's wall.
Facebook documentation uses FB.Api to publish the screenshot, but this method does not display a share dialog, it simply uploads the pic to Facebook.
Answers I have found so far:
Upload the picture using FB.Api, and then parse the FBResult for the picture URL, and feed that to FB.Feed Link to answer.
This method triggers an error, since it is not possible to use a Facebook URL as source for a picture.
Save the picture locally and prepend "File://" to the picture path. Link to question. This does not seem to work either, and the Facebook documentation does not seem to have any information on URL formatting.
My question:
Is this the correct (and only) way to display a share dialog when publishing a picture? Or am I looking in the wrong direction?
FB.Feed only allows you to post link to images. It doesn't upload the images to Facebook. Therefore, these images need to hosted somewhere on the net and not locally.
The best way to make it work is either upload the images to FB (with privacy property set to EVERYONE) using FB.API, and then share the link to that picture via FB.Feed. If you don't want to create duplicate stories, i.e. one from posting the picture and another from FB.Feed, make sure that you set no_story to true.
Facebook does not correctly center the Timeline photo thumbnail when I upload the photo (810x694) via Open Graph API (POST /me/photos). However, when I manually attach the photo as a status update, the Timeline photo thumbnail is centered properly. Is there a request parameter, fix, or workaround for this?
Photo uploaded via OG API:
Photo posted as a status update:
Totally overlooked this, the issue was related to tagged friends in the photo. I changed the tag position to the center/50% to resolve the issue.
I am trying to post images/emotions to a users status. Here is an app that does it: http://apps.facebook.com/status-emoticon/
I've viewed the JS source and I'm cofused, it seems to be sending some sort of code as a message and facebook is turning that code into an image.
Any ideas?
When you upload an image to FB you have to encode it in the body of your HTTP request. I did something like this recently when messing around with the API, check out this project:
https://github.com/abrady/gappengine/tree/master/fb06_canvas
It is a canvas that lets you grab photos from your friend's albums and upload them into an album of your choice. (in particular, look at the function graph_put_file in fb06_canvas.py)
Is there any way to upload an image (UIImage) directly from an iPhone app to a user's wall/feed?
All the samples I see are either using a json-embedded link or they use the photos.upload call with album ID (aid) which results in the user getting the image in his photo album(s).
What I want to do is to upload an (UI)Image created (by the user) inside an iPhone app and upload to his/her wall. Is this possible? Sample code would be highly appreciated.
This isn't possible. To understand why, you have to consider the conceptual model that Facebook currently uses: Posts on a user's wall are just bits of text optionally attached to some link URL. That link URL can be some random image on the web, or it can just as well be an image that the user already has in their photo albums.
But a wall post cannot inherently "contain" an image in and of itself. Therefore you need to host the image somewhere, be it on your own site, or on Facebook itself, inside one of the user's albums by uploading it first to there.
I'm trying to figure out the same thing myself. One thing I did find out is that if you post the "Wall Photos" album they do get posted to the wall. However you only have a wall photos album if you've uploaded photos to your wall from your profile page before. And even then, you need to get the album aid and then post to it.
EDIT
Found a much better solution. First upload the photo to your default album, then make a post to the wall with the link to your photo that was returned when uploading (not a link to the image but the page the image is on).