Is there a way that of a link which an app shared to Facebook via open graph action to the news feed, which when a user/friend of the sharer clicks on it, it redirects to a landing page, where we could grab the information of the user (e.g. Facebook ID) just from the click itself? It might sound a bit magical, but anyone out there knows how?
Of course it´s not possible to just grab the user information just by his click, he MUST authorize your App for that. And you don´t get the real ID anyway, only an "App Scoped ID". Check out the changelog for more information: https://developers.facebook.com/docs/apps/changelog
Related
I am writing an iOS app that needs to do some basic work against the "Instagram API". To login a user I simply hit the "URL":
I do this through a web view. I am able to login the user and get the access token from "Instagram".
So my question is:
I want to be able to know the "Instagram userId" of the user I just logged in.
How can I get the user id?
The user_id is in the first part of access_token
xxxxx.xxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx
user_id = access_token.split(".")[0];
just enter your user name then user id will display
http://jelled.com/instagram/lookup-user-id
So it turns out to be quite simple, I simply didn't figure out how until now. So once the user logs in through the web view the web view returns the access_token. With that I can call this GET:
https://api.instagram.com/v1/users/self?access_token="the access token I just got from the login"
So, all I have to do is use "self" in the url and that combined with the access token will return the user object which contains the username and more.
http://www.otzberg.net/iguserid/
look down the web and you can look about the Instagram User ID Finder, and you should find by yoursef, It's so easy to find.
* Open Google Chrome and access your Instagram Profile Page, e.g. Lufthansa Instagram Page
* Open the Developer Tools (F12 on Windows; ⌥+⌘+i on OS X)
* Click the Console Option
* At the little command prompt enter: window._sharedData.entry_data.ProfilePage[0].user.id and hit enter
* If you get an error, reload the page and try again
* Until Instagram Changes their page, this will output your User-ID
The easiest way to find an instagram user ID from a username is: https://www.thekeygram.com/find-instagram-user-id/. Works for me every time. And they always keep it updated to support the latest instagram api updates (at least from my experience)
The new Facebook developer integration should be really handy and easy, but i'm struggling with creating a test user or a regular Facebook user to get permissions to sign in my app.
I opened a "TestApp", and login in as a "Admin" works great!
The problem is adding more Facebook accounts and test users.
When i tried to add a Facebook account to "Testers" section, i get this (pending) message next to the persons name, and can not log in the app using Facebook with that user!
Same issue with adding a "Admin" to the app:
After this didn't work, i figured if i create a "TestUser" maybe i'll have better luck, but the test user does not show up when i'm trying to add him to the "Role".
Any one that can make this clear to me a-bit more will be much appreciated.
Thanks!
Found the answer, its a bit silly but if anyone else gets the same issue...
After you add a new user to the "Testers" he gets a notification that he must accept, so the "Pending" will go away, and the user will be activated.
This notification does not get to the Facebook home page, only to the "Developer section" of that user. As #rmp251 mentioned, that can be found on this page
Thanks for the help.
I just want to add few details on the answer but I cannot comment.
The test user need to register as Facebook developer (if he not reregistered already)
Link: https://developers.facebook.com/async/registration/
After that he need to approve the request from the app
Then he need to approve the request at this link
Link: https://developers.facebook.com/requests/
I was trying to add an administrator to a Page owned by a Gray account. The invitee would see a notification appear briefly, but it would vanish as soon as they clicked on the Notifications button, and would not show up in their list of notifications.
Workaround: The invitee can go here to see and accept the invite: https://www.facebook.com/pages/?category=invites
In case anyone is trying to add Instagram Test Users, there's also no documentation on where this "pending " request goes.
Log into the invited Instagram account in a web browser. Go to https://www.instagram.com/accounts/manage_access/. Click "Test Invites".
Log in from desktop to your instagram tester account. Press MORE then SETTING, then APPS AND WEBSITES and then you'll have a 4th tab TESTER. Also you have to add tester the instagram account that you want to display.
I'm coding a simple app which should use some FB connect mechanics but I don't want too much overhead here so maybe you can share your thoughts/experience on my task:
merchants can post products they want to give away for free
users can register for the article and get into a raffle
Once a user enters the page, I want the page to connect to his FB profile URL (facebook.com/username). User hits a "Add me to the raffle" button, the FB profile URL gets stored into my model. The merchant or a cron choses the FB profile URL randomly, displays it and lets the merchant connect to the winner (this I realised already).
This is what I've done so far:
http://limitless-brook-6233.herokuapp.com/ads/1
as you can see, I realised it via email addresses which get shuffled by the merchant. This is not very clever since FB profiles are somehow more unique and everyone can participate only one time.
What is the smartest way in your opinion to retrieve a user's Facebook URL and store it into my database? I just need to attach it to some text/input field (non editable) and let the user hit that button.
Thanks for any support.
You need to use Facebook login, take a look here
https://developers.facebook.com/docs/facebook-login/
or here
https://github.com/mkdynamic/omniauth-facebook
for the second one use version 1.4.0 as 1.4.1 has ome annoying bugs.
I've a trouble with my link on published action.
When my action is published, the link appear like that:
http://www.facebook.com/l.php?u=http%3A%2F%myDomain.com%2F%3Ffb_action_ids%3D3085543269620%26fb_action_types%3Dvideo.watches%26fb_source%3Drecent_activity&h=dAQF21zjX&enc=AZP6SPsPIfAKMoNKqLKjTEig1nsAERVmwUcrfURxEHA34JS11i5ofB29bXKBaOrkm0cOv-Lyg5IVTth3Kr308Qar
And I see on another app who used the same action, the link appear like that:
http://www.facebook.com/connect/uiserver.php?app_id=XXXXXXX&method=permissions.request&redirect_uri=http%3A%2F%2FTheDomain.com%3Ffb_action_ids%3D3056990355815%26fb_action_types%3Dvideo.watches%26fb_source%3Drecent_activity&response_type=token&display=page&auth_referral=1
Did you know why we haven't not the same publish link type ?
I want to publish with an URL like that: http://www.facebook.com/connect/uiserver.php?app_id=XXXXXXX&m.....
Best regards, sorry for my poor english :/
The link of the first type appears when a users click on a link which will take them to an external site.
The link of the 2nd type appears if the app has enabled Authenticated Referrals in the app's settings. When a user click a link of this type, Facebook links into the Authentication Dialog to generate an access token or OAuth code, the user is then redirected to the Action URL.
I'm doing a little experimentation. The end goal is to open Twitter in a new tab for a user that is already logged in.
I have gone down the oAuth route and I can post to twitter, retrieve tweets etc. but when I visit Twitter.com I still get the login page. I have a couple of questions
A) Is it possible to automaticaslly log a user in like this (I can see why it can't be but need to make sure)
B) Does anyone know of another way to acheive it?
When you redirect the user to twitter to authorize, send them to oauth/authenticate, instead.
This flow is called Sign in with Twitter.