I am developing a greeting card application. Greeting card should be posted to multiple friends' wall. I had used graph API to upload picture to friend's wall using [friends_Id]/photos post. Using this approach Facebook will create an album in to that user account automatically rather than creating or sharing photo to friends. After photo upload this newly created album will be shared to friends. This is not the option which I'm looking.
Facebook will use the same album for other photo uploads. Since album was shared to some friends, all previously shared friends will get notifications on their news feed for this new photo upload. So I omitted this approach.
Second I used posting image link to friend's feed. This time Facebook won't allow me to post image links with hosted on their server saying that FCDN images are not allowed in stream.
Hosting a server will be an expensive option for me.
Third I used photo tagging approach. This work well. But this is not the required option.
In Facebook website there is an option to share a photo in an album to my friends wall. Can I implement this approach using graph API? Is there any option to share an uploaded image to friend's wall using graph API?
I hope that my question is clear to you... Please help.. :)
Perhaps this approach will work you. See https://developers.facebook.com/blog/post/526/ where you can post to a wall and refer to an existing photo, or basically attach a photo you own to a friend's wall. So here are the steps:
1) Upload the photo you are interested in sharing to your album. Note the photo ID.
2) Send an HTTP POST to https://graph.facebook.com/[FRIEND_ID]/feed with the object_attachment parameter set to your photo ID.
Please note that you will need an access token with publish_stream permission.
Related
In tumblr.com, are there any API to collect media data such as photos, videos of an account?
Like Facebook, there are Photo , Album feature which allow user to get photos.
Thanks in advance.
Tumblr is blog-based.
So, you can't post a photo or video like Facebook.
Therefore, you can not retrieve photos, videos via Tumblr developer site http://www.tumblr.com/developers
I think there is only way to do this job is you can get all posts of a blog, then detect whether there type are photo/video. Then, extract photos/videos from posts.
What is the fundamental difference between uploading photos to an album or posting directly to the users wall? I want to provide the user with the best experience possible on my application, I also want to use an approach that also benefits my application in terms of social promotion.
Well, it's the same as when done manually, isn't it? Posting to wall gives you one post with photo in it, and posting to album gives you link to album with some thumbnails on your wall.
I am working on a project where a photo is taken and the user can share their photo on Facebook. We would use oAuth and the FB Graph API to post the photo and caption to the users' timeline. The client just made a request to also post it to their (the client's) photo album as well. So when the user submits a photo, it would post to the user's timeline as well as the client's timeline/album. Is this double post (to two different accounts) possible? Wouldn't that require that the client be logged in via oAuth as well? Also, are there any FB legal/regulation issues with this so long as the application has a disclaimer that it will be posted to two different places?
The entry for the user is a new photo to the apps album for that user. me/photos
However the entry that goes to your clients page... I don't think people can do id/photos of others or pages. (it's worth a shot)
You'll have to stick to id/feed and perhaps include a link to an image host.
I'm doing a FB app where users are able to upload a photo to a photo album that is created at the same time. My problem is that I only want the photos to go into the album avoiding the post of the same photos on the users wall and in the users news feed.
Not sure if that's possible or if there's a workaround.
Thanks for your help
You just need to use the parameter no_story=1 within your call.
This is not documented on Album or Photo, but is on User and it works for Photos as well.
Related to: facebook upload photo without news feed post? Possible?
The only way to work around this is to delete the stories (posts) generated for each photo upload. To answer another question in the thread you can do batch photo uploads, see this blog post https://developers.facebook.com/blog/post/493 that explains how to do this using Batch Requests.
Assuming you used batch requests (or even if you upload one at a time) you can follow this process:
After uploading the photos through Graph API, note the id of the photo(s) uploaded.
Make a call to https://graph.facebook.com/me/feed?fields=object_id&access_token=youruseraccesstoken to get your latest wall post information. You may choose to pass on a limit parameter so you do not get too many results.
Loop through the results, looking to match the object_id to the information saved in step (1). Note the corresponding id, these are the wall post id(s).
For each wall post id found in step (3) issue an HTTP DELETE to https://graph.facebook.com/POST_ID with an access_token that has publish_stream access.
The wall posts should be gone but the photos still in the album.
Can I upload photos using Facebook API but not post to wall in Facebook?
What I use is the photos.upload in the API.
If it cannot be avoided, is there any way to delete that wall post so that I don't have to do it manually?
Documentation of graph API (http://developers.facebook.com/docs/reference/api/photo/) mentions the following:
If you would like to suppress the
story that is automatically generated
in the user's feed when you publish a
photo (usually because you plan on
generating your own), you can add a
no_story=1 parameter. In this case,
the user will receive a notification
that your application has uploaded a
photo.
Adding the same parameter to the legacy REST API seems to work for me
Let me answer my own question:
It's about the permission problem. We can set the permission so that the photos do not publish to wall.