Can we do LinkedIn profile search just like office 365 outlook do using LinkedIn API - linkedin-api

I am working on one java-script app in which i will show employees of my ORG with LinkedIn button just like O365 Outlook and after click on that button LinkedIn matched (matched with the name of employee) profile will show.
I am trying this API "https://api.linkedin.com/v2/people"
but it is giving me error "Not enough permissions to access: GET /people" even i am providing access token.
Can some one help me on this.
Thanks,
Dinesh

Related

How do I manage a users facebook "managed pages"?

I am currently working on a project where we want to post to a users facebook wall or the wall of one of a users managed pages.
See this page: https://socialiteproviders.github.io/
Note that facebook is not listed! Weird being it is one of the top social networks, why is it left to be a custom, override provider?
return Socialite::with('facebook')->scopes(['publish_actions', 'manage_pages', 'pages_show_list'])->redirect();
and then
$user = Socialite::driver('facebook')->user();
Where can I find documentation on socialite in regards to facebook? Specifically how do you get the information on managed pages for the user who just logged in.
We do have app permission from facebook. When you link your account, on the facebook page it pops up asking to give permission to the app to manage pages.
When I dd() the results of ->user()
I get
token, refreshToken, expiresIn, id, nickname, name, email, avatar, user -> [name, email, gender, verified, link, id], avatar_original, profileUrl.
If I understand correctly, there should be a way to get a "data" attribute that contains information on managed pages.
see this link: https://developers.facebook.com/docs/pages/access-tokens#multiple-pages
Am I going to have to work directly with the Facebook API, or is there a way to get this information out of socialite?
Thanks!
EDIT:
I was asking additionally about a facebook provider, and whether it was hard coded into socialite. I have since posting this foind in vendor/laravel/socialite/SocialliteServiceProvider.php is actually wired up for facebook. I still however, cannot figure out how to manage a facebook users "managed pages"
You are close, in my opinion.
As you can see in the Facebook API Documentation, to give your application the ability to publish in a page that the user manages, you need to ask for manage_pages y publish_pages permissions.
On the other hand, by default Socialite will ask Facebook for the most common fields (like id, email, name, etc) but to get extra -driver specific- fields you need to specify them too. So this should do it:
return Socialite::
with('facebook')
->scopes(['manage_pages', 'publish_pages', 'the_rest_of_your_scopes'])
->redirect();
And to retrieve the user:
$social_user = Socialite::
driver('facebook')
->fields(['accounts', 'some_other_extra_fields'])
->user();
Disclaimer: I haven't test it yet, but this should include an accounts key in the user object that will have an array of the user page(s), his/her role(s), page info and the token to perform actions in the page (yes, like publish).
I hope this can serve you as a guide at least. Good luck.
If you check the following Official Laravel Socialite Pacakge
(Use this Package )
https://github.com/laravel/socialite
Facebook providers are there already.
Get the access token from Facebook
Save it to database
Use the graph API of facebook to access page details.
Send the saved access token with api requests
Alternatively you can use this package too.
https://github.com/SammyK/LaravelFacebookSdk

Facebook Messenger Platform: how to get user specific information?

I'm trying the recent released Facebook Messenger Platform and so far so good. Everything worked well and I was able to create a echo bot.
But I'm wondering how I could identify this user that started chatting in my page. For example, when a user started chatting I get a PID user (page specific user id).
Making the follow request to Facebook Graph API:
GET https://graph.facebook.com/v2.6/{PAGE_SPECIFIC_USER_ID}
I discovered that I can just ask for the following fields: first_name,last_name and profile_pic.
So my question is, how could I discover if this user is a current customer of my business page? Is there another way of querying more information (like e-mail and real facebook user id)?
Facebook has updated the messenger platform API (2016-07-01) and introduced a new feature called Account Linking. This can be used to identify a user who has created an account on your website via Facebook Login and you can link the two accounts. Facebook login has its own set of permissions which can be used to get a lot more information via Facebook graph API. You can find the complete list here.
Currently, there's no way to do this. The best way would be to prompt the user to enter their information in chat or give them a link to a mobile login page or some other way of linking their account to the chat.
Messenger Platform 2.0 introduce "ID Matching API" ,that will solve the problem.
https://developers.facebook.com/docs/messenger-platform/connecting-accounts
you can retreive a user information like below using fbmq library https://github.com/conbus/fbmq
# this method will occur when a message received from user
#page.handle_message
def message_handler(event):
user_profile = page.get_user_profile(event.sender_id)
print(user_profile) #first_name, last_name, profile_pic, gender ...

Facebook login in classic ASP website

I have a Classic ASP message board (http://yankeedesi.com) where users are required to sign up for posting messages. I want to incorporate an additional functionality to login via facebook. I searched on Google but could not find any good examples for implementing this in Classic ASP. Can anyone direct me to a good source of how to do this?
I don't need any advanced functionality, just the basic login feature. My My user registration currently captures the First Name, Last Name, Email address, Country State and City. Is it possible to pull these information from the facebook profile once the user signs in through facebook and create their login in my database?
I guess this should be possible if you manually implement a so-called "Login Flow". Have a look at the docs at
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.0
There you can find a step-by-step guide on how to implement OAuth with Facebook.

Can facebook API do this?

On my site I want members to be able to click a link import your Facebook photo then a Facebook popup opens and asks user to confirm that he/she wants to share their profile picture with my website.
Can this be done? What are the steps? I am looking at the Facebook graph API but I am unsure if this is the right thing, I have huge problems understanding their samples and "help" files.
I was able to easily do this with Gmail and Yahoo, uses can get a browser popup from them in order to confirm sharing contacts with my website, I assumed Facebook works the same to import the profile picture but I am spinning in circles.
Within Facebook Terms for users it states that your name and picture are publicly available so one does not need permission to request it.
https://www.facebook.com/about/privacy/your-info
The naitik call is an example of data that is publicly available without asking for permission.
When you are requesting the current user, that is, you don't know the id or name beforehand, then you use a basic login flow which will then present one of the following dialogs.

Search for FB User ID from an Email ID - like in MS Outlook 2010 Social Connect Plugin

Is there any method to search for FB User ID from email Address ?
Am developing a site where I would like to show the User Profile Pic based on his Email address - if the person is registered and the Profile Pic is made public.
Have tried searching - but am unable to get to any solution - where we can search for User ID - based on Email ID.
It is like how the Social Connect Plugin functions for Outlook 2010.
Thanx !
You can use the following graph API call: /search?q=email#dot.com&type=user
However, it appears this functionality may have a bug in it. See: Facebook Graph API "search" by email suddenly stopped working
The official bug is: http://developers.facebook.com/bugs/292220680814266
The solution is bit tricky now, you can use the friends importer from a Google account, and populate your Google contact via the Google API !
I have setup a bot to to this automatically, but I cannot share it with you, sorry, you have to write ur own^^