In my iphone app,I want to let the user upload an image to his facebook photo Album and publish a story at the same time.The story's media field contains the uploaded image's url.I successly uploaded the photo and got the result's "link" and "src_small" property.But when I use FBStreamDialog to publish the story,I got:
(source: sinaimg.cn)
At last,I find this:http://developers.facebook.com/live_status#msg_625,it says:
We no longer allow stream stories to contain images that are hosted on the fbcdn.net domain. The images associated with these URLs aren't always optimized for stream stories and occasionally resulted in errors, leading to a poor user experience. Make sure your stream attachments don't reference images with this domain. You should host the images locally.
It seems that I can't finish my job,What's your solution? thanks in advance!
you can't use that picture or the picture from facebook itself
you can upload the picture on other servers or upload it to online photo sharing like picasa
I got this functionality to work with ShareKit - it's really good:
http://www.getsharekit.com/
It's also open source, so you can see how they do it inside...
Good luck!
Related
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 have recently migrated from blogger to wordpress, but am having issues with images.
Both Pinterest and Facebook are not recognising my new images that I am uploading to wordpress, however they do recognise the old images that have been imported directly from blogger and still point to blogger.
When I try to pin an image it allows me to select the image, but then when I click "pin" it says "Whoops! Sorry, We could not fetch the image".
With facebook, trying to share the link, the posts with new uploaded images do not load any thumbnails, however the images from the old imported blogs do show thumbnails.
I have checked the pinning from a friends blog who is based off the same theme and I can pin off their site. I have also checked whether the uploaded images are in iframes - they are not. I have verified my website with pinterest.
wen you are in facebook just right click on the image you want, then select "copy the url" return to pinterest and then choose "pin from a website". paste the link and voilĂ ! you can choose the photo to pin-it :D
I managed to get around the issue for now by uploading the images to photobucket and then linking into the post via the url. So it seems that the issue is that they need to be hosted somewhere other than on my wordpress site.
If anybody else posts a better answer that doesn't require the work around, then I'll accept theirs.
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.
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).
I have to create same functionality as facebook has does like all the photos display at one view and from that user can choose photo and it goes to large photo. This photos are showing very fast. I have 5 photos from web but it take so much time. Does anyone know how they shows photo very fast.
I don't know the answer but I suggest you look at the three20 source code on github. Joe Hewitt (who wrote the Facebook app) published much of its code including the photo view. There is also a Google group that discusses three20.
I don't know about the iphone app in particular, but I do know that the main facebook website prefetches images in photo albums.
Facebook creates multiple sizes of each photo when it is uploaded. They also convert all the photos to png I'm pretty sure, likely reducing the file size of the original photo. I know creative has often complained about the "quality" of photos after uploaded to Facebook.
This allows them to deliver the appropriate sized image (both dimensions and file size) for quick display rather than delivering a full sized image and having the client resize it.