Instagram Basic Info without AccessToken - android

Can I get Instagram Full Name and Profile picture without Access Token. It seems I can't find any API for that.
I tried with:
https://www.instagram.com/{username}/media
But, I get only media if user has pictures and if user is public.
I found some android apps get Full Name and profile picture only with Username, I need something like that in my application.

I was trying to do similar kind of thing last month but Actually there are no official APIs for that ,
there is this website https://openinstagram.com idk how those guys crated this APIs but you can try this:
https://api.openinstagram.com/{username}
and replace the text username with any real username and you will get profile picture and full name of that user even if the user is private,
this is not the only example, there are multiple website running on same kinda thing website like web.stagram and websta and it's mentioned on there website that they aren't certified by Instagram (because they are using unofficial APIs)
hope this would help.

Related

FirebaseAuth android get Facebook friends list

I use facebook login in my app. Once the users are logged-in I can get their basic facebook info such as display name, email, and phot url.
I'd like to get their facebook friends list. I think I can get it "directly" with firebase but I don't remember how and I cannot find any info about it. I think I first have to tell Firebase to get friends list when people login with facebook, then I sould be able to get it with a method such as firebaseAuth.getCurrentUser().getFriendList().
Do you know how to get facebook friends list with firebaseAuth ?
Thank you,
Alex
It is feasible, but only the friends that also use your app. The trick is to add a scope to your login method. In Angular it looks like this
this.afAuth.auth.signInWithPopup(new firebase.auth.FacebookAuthProvider().addScope('user_friends'))
That scope at the end is the trick. Then, you need at least two users that are friends on facebook to login. You will note the popup is different as it now asks permission for the user's friends.
The response will include an access token. Then you can use that token to request the user's friends that are also using the app with a GET request like this
https://graph.facebook.com/v2.11/{facebook_uid}/?fields=friends{name,id}&access_token={access_token}
Note I'm using a particular version, but you should change that to whatever you need.
generally obtaining user's all friends list from Facebook is not possible, they removed this option years ago, with API v2.0 introduction... more info about and useful suggestions HERE
there is an official FB API called Graph API and HERE you have some doc about friend lists
and the Firebase... well, this is Google's product and it have nothing to do with Facebook... You are probably using FB mail address for creating an account in Firebase service/database, but it is keeping only this data plus some additional attributes if set (like photo or visible name).
firebaseAuth.getCurrentUser() returns FirebaseUser object, which have THESE methods - like you see: logpass, name, photo url and only few more methods. no option for getting friends list, because there is no method to set them, and no possibility to get this list from FB lib/API

How to get facebook friends phone,email,address and others friends detail information?

How to get Facebook friends's phone, email, address and others friends detail information use Facebook Android SDK 4.4 .
Now I can only get firends id and profile picture by use https://graph.facebook.com/me/taggable_friends? access_token
Sorry dude you cant!
Facebook's new API dosent allow you to take any information such as email,phone number etc
The only chances are
1. me/taggable_friends - Where you can get an Id for tagging your friends and profile picture ( your friends must also use the same app I think)
2. me/invitable friends - This one is for games only to invite people into
your game
I am unable to find the exact link for you but I've read it in developers.facebook itself.
Here is the changelog

Instagram API view public user photo without access_token

I am going to develop an app for a retailer and the client want to show its official instagram images in the app.
Its Instagram account is public and I see that, there is an API for retrieving user recent images.
https://api.instagram.com/v1/users/{user_id}/media/recent?clent_id=XXXXX
The document have not stated that access_token is required but when I execute this api, it says I am missing access_token.
Is it normal or I did something wrong?
Because your requested URL is wrong, it will work only after correcting the 'client_id' instead of 'clent_id'.

How to get a friends user wall from facebook?

I want to read my friends posts (feeds?, all posts but for a specific user only) from his user wall.
I need all (posts, feeds, statuses) that i see when i look at his page directly from the website.
I use the android sdk and i tried the graph api and rest method.
My app is registered and i have logged in facebook to get the access token (permission: read_stream)
but i dont get that infos that want to.
Please help.
Thx.
How about testing your Graph API call in the Graph API Explorer?
https://developers.facebook.com/tools/explorer/
In my case, I could get my first 10 friends' feed (wall) with the url https://graph.facebook.com/me?fields=friends.limit(10).fields(feed)
Note that I used field expansion of the Graph API.
http://developers.facebook.com/docs/reference/api/field_expansion/
You need them to actually use your app and grant full permissions via the graph API.
You cannot simply 'grab a friends wall'. You must do that via your app and it needs the permissions to do so from the user in question.

Upload photo on friend/fan page with Android

I want to upload a foto from my android app to a facebook fan page using the facebook API.
When i look in the hackbook android example app (link). the code looks as following to a upload photo:
Bundle params = new params.putString("url",
"http://www.facebook.com/images/devsite/iphone_connect_btn.jpg"); params.putString("caption",
"FbAPIs Sample App photo upload");
Utility.mAsyncRunner.request("me/photos", params,
"POST", new PhotoUploadListener(), null);
This code works, it posts the photo on my own facebook page. But i don't want the photo to be posted on my page but on a fan page.
As explained in the facebook documentation 'me' could be changed with a facebook User_ID. I tried changing the "me/photo" in "[fanpagename]/photo" or "[fanpageID]/photo", but that did not work. when i used the username i got an error, when i used the ID it post the photo on my own page. In the graphAPI photo documentation (link) no example or explanation is givin on how to upload a foto on fan page.
also the
params.putString("to", [fbid]);
does not work.
Any suggestions?
I have been busy with this research for three full days and did not find the answer for my problem. But i think i have an explanation for it.
if a user posts a photo to friend/fan_page with the official android FB app it uses a "feed" with a picture(url-link). The user can't see on his own wall that he actually shared or posted a picture on the friend/fan_page. (for example: "Bob - posted a photo on CocaCola")
This is probably the reason why the function is disabled because developers could use this to send photo's to all kinds of friends/fan_pages without the user being aware of it.
I came to this hypotheses because i found a sort of work around. First upload the photo to users own album. get the URL of that photo and then post a "feed" on the friend/fan_page with a picture(url-lnk). Facebook then gave this error: "FBCDN image is not allowed in stream" in other words, you can't use photos that are on FB website domain to link to. So I think there is quite a bug/lazyness in the facebook developement departmet :P which is a pity because it is a nice socialnetworking function for mobile apps.
You are on the right track, but to publish photos to a Page you will need the publish_stream and manage_pages permissions, and the Page Access Token to prove you have them. You can read more about this here:
http://developers.facebook.com/docs/reference/api/page/#photos
http://developers.facebook.com/docs/reference/api/page/#page_access_tokens
Some example code (using the PHP SDK, but the logic should be the same in any language) is here: https://stackoverflow.com/a/7222078/164439
Update:
If you want to post to the Page's Wall/Feed (without being a Page Admin), you can do that without the Manage Pages permission and the Access Token stuff.
But it's different than publishing a Photo object to the Page's Photos collection, which is what I thought you asked. You actually want to do a regular Post to the Page, with a Picture attachment.
Here are some resources to do this:
Facebook Post API: http://developers.facebook.com/docs/reference/api/post/
http://facebook.stackoverflow.com/questions/691425/how-do-you-post-to-the-wall-on-a-facebook-page-not-profile
http://facebook.stackoverflow.com/questions/5756474/post-to-facebook-page-wall
Using Facebook Graph to simply post a wall message with just javascript
Good luck!

Categories

Resources