please help me get new way to get public profile picture from FB. I'm using it in my home system to get current user photo.
Few days ago something has changed and my solution stopped working.
I was using graph for 3 pictures:
Example:
https://graph.facebook.com/17xxxxxxx94/picture?type=large
But this is not working anymore. It seems they enabled some security and token is required.
With app token I created under developers.facebook.com I'm able to get my picture
However only mine, not able to get picture for other users. Is there a way to create some token to get public picture from FB?
Related
There are two answers here:
How to get Instagram Profile Picture?
Using https://www.instagram.com/USERNAME/?__a=1 is working now but not official, it could be down any time without notice.
how to get instagram profile picture
https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN is deprecated now and is not valid for review
The latest doc shows the way to get profile of business and creator only
https://developers.facebook.com/docs/instagram-api/reference/user
Is there any way to get name and profile image of normal user officially?
I know there have already been a lot of questions asked about replicating the users home feed and using me/home, but my question is slightly different.
A few months ago I wrote code to authenticate with Facebook (get user access token) and then retrieve their home feed with me/home. This worked fine at the time as far as I can recall. I've just gone back to the code today, and it doesn't appear to work. The result I get back looks almost the same as me/feed, which is to say it is almost entirely posts from the same account and not posts from 'friends'. Just one post from someone else, a change to their profile pic, shows up but the rest are all 'self posts'.
This only happens with tokens for my own app. If I use graph explorer using the same token, I get the same result. If I use graph explorer with it's own token then it shows me something much more like the actual home feed on the Facebook site. Generating new tokens doesn't help. I have checked the permissions on the tokens used are the same, in fact I even copied the permission list from the generated graph token into my app and re-authenticated, but it didn't help. If my app does the request, then I get almost nothing from other people from me/home. This is the same if I use myuserid/home. Makes no difference.
So my question is, why? Have Facebook changed something and is there a way to change my app so it gets a better version of the home feed?
Secondly, while researching this I've discovered posts saying read_stream won't be granted by Facebook to any app on any platform that has an 'official facebook app'. Does this mean I'm out of luck anyway, even if I get this working for testing purposes using the account that owns the app, I won't actually be able to publish it so others can use it?
Thanks.
I'm new to the Facebook Graph API. I've figured out how to access the feed of a secret group, but the posts with photos uploaded to them don't show the photos. I requested every permission to make sure it wasn't an OAuth issue. The post shows up with a type of status. I tried connecting it to photos and I always get an empty data array.
I looked at a public group, and the posts with photos show up as a type photo and contain a picture element.
If I post the picture in the secret group, then I can access it shows up as a photo post. If I update the picture in the exact same way as another user, then it shows up as 'status' with no picture. This smells like a bug (since I've requested full permissions for both user and friends).
I'm currently using the web based Graph API Explorer and I tried the beta version too, just to be sure.
If there is a different API I need to use to access secret group photos, please let me know!
That's a bug. I've already reported it (on November 28 '13) but yet to be resolved.
I'm not able to change the bug's privacy settings so the bug is visible to me only.
I'll post here after its resolved.
I've been searching for a few months now and I'm just tired of searching...
I have a PERSONAL facebook account. It is not a business account or a fan account or anything like that. I want to automagically put the photos on my personal website. This is what I've found:
Hundreds of examples about how easy it is, but they only work with fan accounts.
A few claims that if I spend a few years making a Horoku app, I might be able to get it to work.
Many blogs about people who tried this, gave up, installed Wordpress and converted everything to Wordpress, tried all the Facebook photo widgets only to find that none of them work, and finally giving up.
So... Is there an example ANYWHERE of someone who wrote some code to fetch the names of all albums shared with the public and all the pictures shared with the public for a personal Facebook account? Also - this is NOT a request for a widget or app. I asked this question twice before and both times it was closed right away because the first person buzzing by said I was asking for a Wordpress widget or app.
Easiest way:
Get an account on IFTTT and set up a recipe that takes photos uploaded to your personal Facebook account and posts them to a public location you can access or embed on your website.
Second easiest way:
Create a Facebook Page that only you can post to.
Share your photos with that page.
Either query https://graph.facebook.com/PAGE_ID/photos (no access token required) and parse the returned json to display the photos (or use any number of tutorials / prepared scripts to display the photos).
The way that meets your request exactly:
Create a Facebook app (not a Heroku App).
Configure the app for "Website with Facebook Login" with your website information.
Login to that app with only the user_photos permission and store the short-term access token you are given.
Extend the short-term access token and store this.
Use this access token to query https://graph.facebook.com/me/albums?access_token=ACCESS_TOKEN, and find the id of the album you want to share.
Code your script to query https://graph.facebook.com/ALBUM_ID/photos.fields(source)&access_token=ACCESS_TOKEN and parse the returned json object to use the urls returned in each source object as the src for <img> tags to display these photos.
Code a reminder system for you to renew your stored access token at least once every 60 days, or whenever it expires.
I tried a number of methods of posting to Facebook using Graph API and I have a problem with creating a post with attachments not showing up in the News Feed.
If I post just a text message, it shows up in the News Feed. Anything that has an attachment goes only to the wall.
Does anyone have an idea on what is the cause of this and how to fix it?
I have no idea what was the cause of the issue, but I resolved it by creating a new Facebook App, with new ID. The same scripts that only posted to the wall started posting to the news feed on the new App ID.
I think it's because you're adding attachement or a link to your feed.
As per http://developers.facebook.com/docs/fbjs/streamPublish/
they say :
Updating a User's Status
You can use this method to simply update a user's status. When you do so, the status message appears at the top of the user's profile and on the Friends > Status Updates page. The message also appears in the stream with your application icon.
To use this method to set a user's status do the following:
* Do not include an attachment or action link. If you do, the story will get published and will appear in the stream and on the user's Wall only. It won't appear at the top of the profile or in the Status Updates page.
* Make sure the message is no longer than 420 characters. Otherwise, an error gets returned.
I know this is an old post but I was having the same issue and I resolved it. Since there wasn't a valid answer to this post and it came up in many of my searches in Google I thought I would add the answer.
The main issue that is happening here is a permissions issue with the App and Access Token created in https://developers.facebook.com.
You can both GET and POST attachements on a wall but you have to give the Users Access Token the permission to access it in the first place. You can do it like this.
1. Go to your application on FB
2. Click on Graph API Explore
3. Click on Get User Access Token
4. Click on user_photos and user_videos
There are many options here but to get the basic attachements which tend to be photos and video you can just select those two, but you can add as many as you want.
After clicking Get Access Token at the bottom to save it you have to login with your password then give your access toke permission for your account. Once you have done that you now how permission to access your feed attachements (photos and videos)
Here is what the Graph API output looks like showing the picture from the feed
Now keep this in mind this is a Short Lived Access Token which lasts about an hour and it will stop working. You have to convert this token to a permanent token and let me save you the time you will bang your head trying to figure that out because I wrote a php function that will generate your permanent token from your short lived token all in one shot for v2.9
Check out my post reply here
facebook: permanent Page Access Token?