Looking through the Foursquare documentation I found the Photo Add section.
In APIs for other social platforms I have been able to post an image by its source url, e.g.: https://www.google.com/images/srpr/logo3w.png (e.g. this is possible on Facebook & Tumblr)
The documentation is a little unclear about the capabilities of the post* developer preview argument.
Is it possible to "upload" an image by its source url to Foursquare?
(otherwise can I get this added to the feature request queue?!)
It is not currently possible to upload an image by url. You will need to upload the image data with your photos/add request.
Related
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.
We currently allow users to post images to their FB wall by using FB.Feed() with a URL of existing images on our CDN and we can include a description, a link, caption, etc.. The interface for posting the image is great because it's built by Facebook and gives the ability to choose who sees it (friends, me only, etc.).
We now want to allow users the ability to post images of their creations in the game, which obviously can't be pre-taken images on our CDN, and we'd prefer avoiding the route of uploading all the images to our CDN then using FB.Feed().
I know it's possibly to upload an image using FB.API() but this requires us building a custom popup to allow the users to type what they want to say for the message of the image rather than using the built-in popup from FB.Feed() and it doesn't give the options of who sees the post and as far as I can tell, it doesn't let us add a link, description and caption.
TLDR: Is FB.API() the only way to UPLOAD an image to a user's wall? If so, this requires building a custom interface for it instead of using the built-in FB.Post() interface, right?
Thanks,
Colter
Edit: I didn't see this post until now, but it's a similar question but I want to know if there is the ability to add a description, link and caption to the image AND use the built-in FB interface.
Copy/paste from Brian Jew's comment above:
"There currently isn't a way to upload screenshots without FB.API(). It does sound like an interesting idea to have something like that for FB.Feed() though."
I've read the documentation here.
I have an action, "cook", which is applied to an object "recipe". I want to allow the user to post a photo of their cooking when they perform the action.
I would like to have the photo hosted on Facebook. Is there any way to post the actual image data as part of the request, rather than posting a URL to the user generated photo?
The docs say
The photo used will NOT be taken from the object's meta data og:image tag. Instead, it is passed with the POST
and
The photo will be uploaded and placed in a Facebook photo album titled after the "App Display Name" for that app
but they also mention that the image[0][url] property is required.
The context is an iOS app: the user takes a photo on the device and wishes to post it to Facebook. To get a URL to the image, I'd obviously have to do an upload to some web hosting somewhere as a separate step, which would be harder to code and would require some hosting.
but they also mention that the image[0][url] property is required.
You’ll have to upload the photo first to some place where it’s available over the web via HTTP, and then give that URL while posting your action.
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?
So what I am trying to do is post an image that has been created by a user on an iphone into that users newsfeed.
The functionality I am having a hard time understanding if it is possible:
Can I pass a local NSURL (or URL?)(to a png file that lives in the documents folder) through a JSON string and onto Facebook?
i want to mimic the action of a user going to his/her facebook page, clicking into the textfield for their newsfeeld, uploading an image by clicking the "photos" icon and selecting an image from a local disk and uploading it. I would also like to add some text into the post optionally.
I'm just getting started with the Facebook api and it seems pretty tough right now, any help would be appreciated. code examples appreciated.
Thanks,
Nick
You'll need to use a third-party image host like YFrog or roll your own image host. Facebook requires that all media attachments (including photos) be hosted on the public web. Even though they cache the images themselves, the URL that you send to them has to have its own public URL. Many of the popular Twitter image hosts have simple REST APIs to achieve this.
You can also use Facebook itself to host the image via their photo.upload API, if you don't mind two side-effects: it will appear in the user's photo albums, and the thumbnail is likely to appear in the stream twice (once representing the addition to the photo album, and the second in the actual stream story you publish). You can't currently get around this doubling artifact, but it will give you a stable host for the uploaded image.
Just to clarify this. I was actually able to pass and image directly from the iPhone without a third party but that was posting an image to a users photo album. There are I think two methods in the fbconnect api for posting one contains an extra argument for a data argument which can be an image. I'll post more details when I'm in front of the documentation.