Is it possible to upload photos on friends wall? The documentation never mentioned that! but its happening. I am able to post to the /friend_id/photos connection.
I am actually running my app on local server using localhost tunneling. So, in August, I made an app where people can post photos on their friends wall (upon their request only). So, As I was pretty new to FB API, I didn't notice that it is not allowed.
I just left the app for few weeks and came back to fix things and I noticed that I am unable to post photos to the /friend_id/photos connection (Its just not working. I am not getting any errors). Its not even working for other possible connections like /friend_id/feed Is my app restricted to some graph actions?
So, I just created a test app and executed the same connection /friend_id/photos and **its working. Don't know why!**
This is not the end of surprise:
I successfully posted a photo on my friends wall using my test app
When I opened the photo, I could see its from "Surya's Photos" - my photos
I don't see that photo in my albums. I just don't know where its actually saved.
Update 2: This is indeed possible (is it a bug?) the same regular way.
But seems that posting of photo to other user's /photos connection behave very differently from posting to /me/photos. Here are some of the facts about posting to /FRIEND_ID/photos:
Every photo published that way creates separated album named Posting User's photos (that's it uploaded photos will never be grouped and there is no way to see all of them in single place).
That photo will not be visible in albums of either user or friend, but only will be seen/accessible via feed/timeline.
And for sure this is only working if you able to post on that friend's feed
So it really behaves just like any other content posted to friend's feed.
I would say if you not rely on album functionality and persistance of those photos and only want to "share" photo on friend's wall, go for it (unless it's proven to be bug).
TL;DR; No you cannot post photo to friend's /photos connection. Well, you can post photo to friend's /photos connection but it will not behave the same way if posted to your's /photos.
According to documentation of photos connection for user:
Create
You can post photos to a user's Wall on their behalf by issuing an HTTP POST request to PROFILE_ID/photos with the publish_stream permissions and the following parameters.
Also according to documentation of photo object:
https://graph.facebook.com/USER_ID/photos - The photo will be published to an album created for your app. We automatically create an album for your app if it does not already exist. All photos uploaded this way will then be added to this same album.
So generally speaking you trying to upload photo to other user's album but you may only post photos to your profile (or to page if using access_token for page).
You may however post to feed of other user (for example post may or may not have picture as attachement, which isn't the same as photo).
Update:
Photos may only be uploaded to /USER_ID/photos than USER_ID is the same as me (owner of access_token).
Is my app restricted to some graph actions?
There’s some places where FB say in the docs or developer blog posts, “If you misuse feature xy, your app’s ability to use it may be revoked” (not literally; I’m paraphrasing here, but something like that).
So it’s absolutely possible, that FB revoked the ability to post photos to friend’s walls specially for your app, because too many users receiving photos on their walls this way have marked them as “spam”.
(“Revoking a permission” is maybe not the exactly correct wording here; I think it’s more likely the Graph API accepts the requests made from your app in the first place, but then silently filters it out in the back; that would also explain why you not get any errors.)
Related
I seen this app from Facebook can change profile picture back on time after we change their profile.
https://www.facebook.com/gameface
Anyone can advise me? How to make likes this with JavaScript SDK.
Because after looking for document on https://developers.facebook.com/docs/graph-api/reference/user/photos/
I don't found the parameter on Graph API look like that.
You can’t.
It is not possible to change a user profile picture via API – at least not for common 3rd-party apps.
Whenever you’ve seen one of those “merge my cover photo with another picture/flag/logo to show support for cause x” apps/campaigns (that can do so automatically), or the temporary profile picture feature you meantioned – these are apps resp. functionality made directly by Facebook, or a partner company.
The most you can – or cloud, I don’t know if that is still possible – do, is let the user upload an image to their profile pictures album, and then (web/desktop only) redirect them to a specific URL, that brings up a page/dialog, that allows them to set that image as their new profile picture. (I don’t remember the specifics of that URL – if you’re interested in that possibility, research it, or try and figure it out via their UI in the browser.)
I'm trying to create a webpage that can incorporate LinkedIn info's (profile,people,company, etc...).
The things that it can/would do are the following:
When the user enters a name that is registered in LinkedIn, he gets the following
*Name, Company, Email
*List of LinkedIn messages that are waiting for reply
The same process goes on everytime the user adds a profile, I'm planning to use the Profile API of LinkedIn to get the Name, Company and Email but I can't find a working example to be my basis.
As for the 2nd one I still don't know how to get the LinkedIn messages.
Here's my Layout and expected result.
How can I achieved this? Opinions and Suggestions are highly appreciated tnx
This is far to broad a question for me to invest the necessary time in to figure the answers (multiple) for you, but do let me give you some hints. First of all, from my experience with the linkedin API not all the data you wish to access is available (do double check this though, I used the API quite awhile back and stuff might have changed in the meantime). As this data is not available through the API the only alternative would be to somehow bypass the cross domain policy, which in conclusion would require the user to install a chrome extension/firefox plugin which will function as a proxy for your application or even 'better', make you entire application a browser plugin based web app. Not that I am a fan of those whatsoever but if you application is meant in any way whatsoever as a linkedin (dedicated) plugin (probably as part of a greater service you're developing) then it might make most sense.
The whole system you are describing is very long winded and requires a large amount of development time. Alot of the data is not accessible directly or indirectly too. You cannot get email address's out from the API as a security feature (bots could just harvest emails for marketing campaigns).
First of all, you will need to make an application that allows for oAuth2 connections with the linkedin API service. People will log onto your website, click to join their linkedin account with your website and your website will receive back an access token to do the calls.
You will then need to build the queries which will access the data you require. The linkedin API documentation (http://developer.linkedin.com/) isn't greatly indepth but it gives you a good understand and points you where you need to go. There are also a couple of pre-done php API's around such as https://code.google.com/p/simple-linkedinphp/.
I have worked with many API's from twitters, facebooks and LinkedIn's and they all require a lot of back-end work to make sure that they are secure and get the correct data.
It would take me hours to go through exactly how to do it and has taken me many hours to get a solid implementation in place and working with all the different calls available.
If you have minimal coding knowledge, it would be best to go to an external company with a large amount of resources and knowledge in the field who can do it for you. Otherwise it may take many months to get a working prototype.
I want to create a button, when clicked, should open a Facebook dialog requesting user to post a photo (I mean a photo. Not a attachment link) on their friends wall.
Is that possible?
Actually this might remove the possibility of asking permissions for publish_stream as user will have entire control over what to publish and what not..
I'm almost sure it's not supported to post to another user's /photos connection -
When you retrieve the post ID you get, are you sure it's not appearing in your own profile / your own activity log?
{edit} there is no dialog which simulates the 'upload a photo to a friend's profile' functionality of facebook.com {/edit}
#Surya: You need the user's permission to post photos on his wall, and for that you need his permission to access his photos, which is achieved by the "publish_stream" parameter in your request. As far as your question is concerned, posting photos on your friends wall doesn't seem to possible. Even if it is possible it won't post it to your friend's wall unless he/she permits that. There is a way by which you can post the videos/photos but as a link and not as proper photos. Also I had noticed one more thing when I was trying to use photo sharing graph api, that it doesn't publish photos to your account immediately. It seeks the user's permission to be published, else the photos remain in his unpublished albums. You will find that album when you click on "Photos" section of your account. Check out my blog for more details :)
http://bashwithflash.blogspot.in/2012/05/photo-sharing-on-facebook-using-graph.html
http://bashwithflash.blogspot.in/2012/05/album-sharing-on-facebook-using-graph.html
I'm building a website for a group that mirrors a facebook group, and I'd like to pull any photos of the group from facebook and display them on my site. BUT the photos might be uploaded by perfect strangers: so basically, a random person takes a picture of the group and uploads it to facebook, and we want that photo to be visible on our website.
I could think of three ways to do this:
tag the photo as the group and find all photos tagged as the group
It seems you can't get Graph API access to photos tagged as a particular group (please prove me wrong). I can do this in FQL: SELECT images FROM photo WHERE pid in (SELECT pid FROM photo_tag WHERE subject=GROUP_ID), but from what I can tell, this requires the website visitor to log into facebook to create a FB session, which is no good.
'share' the photo on our FB Page and somehow find all photos we've shared on our page
I can't seem to think of a way to restrict a search of shared objects to photos, but I'm open to suggestions.
re-upload the photo ourselves into a group-controlled photo album
meh. The first two options don't involve creating any new objects on facebook, and would be preferred, but I'm having a hard time doing either of them, which leaves me with downloading the photos from facebook and uploading them all over again in our own photo album, which I know how to show.
Please tell me there's a better way to do it than #3?
I've wrote a little PHP app which turned my Facebook news feed (/me/home) into RSS, and make it possible to subscribe by Google Reader. Although my project has nothing to do with publishing, I think you'll need some similar technique with the offline_access I've used there.
So, first of all, you'll need dummy Facebook user account which have the permission to read and publish in the group (since that's a public group so save you from some trouble)
Get the access_token of this user with "offline_access" and other scopes required for publishing like direct url example here http://developers.facebook.com/docs/reference/dialogs/oauth/
Then... hard code the access token into the PHP script
$access_token = the access token from oauth;
$facebook->setAccessToken($access_token);
Therefor, this script would act as that user. Anyone browsing the mirrored website doesn't even need a Facebook account.
After solving the authentication issue, the rest just simple coding for querying, uploading, publishing. Hope this would help
I've written a bit of JavaScript that will fetch all of the posts on a Facebook Page. The URL with which I do that is this:
http://graph.facebook.com/cocacola/feed?limit=5&callback=facebookResponse
and this worked fine and dandy, right up until last week sometime, when I started seeing oauth errors.
I've searched for an hour or so on Stack, and seen plenty of other people are trying to do this, - but none have been asked after all of my requests to FB started returning these oauth errors.
It really doesn't make sense, - I'm trying to access publicly available data from company pages. I can still do so without oauth (albeit in a limited fashion) via RSS.
Anyhow, I'm hoping someone can clue me in as to how to get this PUBLICLY AVAILABLE information without having to go through the rigmarole of getting an application ID, an authorization token, etc.
This is a recent not-so-recent change, but you now need an access token to access /feed and /posts. Annoying, but at least it's navigable.
Edit: updated the link, which has broken in the many years since this post was relevant. Here's the relevant text from that post for future posterity:
Breaking change: Graph API PROFILE_ID/feed and PROFILE_ID/posts requires access_token
The Graph API PROFILE_ID/feed/ for a Page, Application, User or Group and PROFILE_ID/posts for a Page or User will now require a vaild [sic] access_token to access the wall or posts of the corresponding object (where previously no access_token was required). This will also affect direct FQL queries to the stream table, when querying for posts on a wall.
You will need to pass a valid app or user access_token to access this functionality. Please update your code if you are calling this API without an access token. This change will go live a week from today - Friday(June 3rd). We have updated the Roadmap to reflect this change.
Moving forward, you should always pass a valid app or user access_token with all API requests.