#linkedin - LinkedIn autofill plugin: how to grab the user's url? - linkedin-plugins

I would like to use the Autofill Plugin to have the user pre-fill the form on my page. However I also need the URL of the user's LinkedIn Profile but, according to the documentation, it is not provided with the available fields. Is there any way/hack to retrieve this info?
#linkedin

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

Get users twitter id?

Can anyone tell me if there are any fields in the FB Graph that list a users twitter ID if they've linked it to Facebook.
No, there's no place in a Facebook profile to provide that information, and no way to retrieve it either - you'd have to get your user to log in to both Facebook and Twitter using their respective APIs

how to show facebook and twitter user profile image on my website's comments

I am showing Gravatar's Avatar on my webpage comments
like that
$hash = md5(trim($row['email']));
$default_usr = urlencode('http://localhost/example/images/user-icon.jpg');
src=\"http://www.gravatar.com/avatar/$hash.'.jpg?s=45&d=$default_usr'\"
but i want that as avatar's when someone post a comment on my website using an email
which belong to its facebook account or twitter account his/her 's image shows on my website's comments too.
But i don't know how?
Any Facebook Lover or twitter lover who can help me Please Please.
I do not want to use facebook app i am developing my own comment widget using php where i want to use it
http://graph.facebook.com/paul.knox.anthony/picture
will get you the profile picture of a user from the Facebook graph API. file_get_contents() with PHP should allow you to grab that. However, it looks like you only have the email address of the user. In that case, you'll need authorisation from Facebook to get the user from just an email address.
See: Is there a way to get an user's email ID after verifying his/her Twitter identity using OAuth?
Facebook API - How do I get a Facebook user's profile image through the Facebook API (without requiring the user to "Allow" the application)
You are most likely going to have to do some OAuth stuff.

What type of application to choose

I want to create facebook application that will allow to insert some data from my site to user's profile. User can choose to set up application. The users enters his ID on my site and when user's profile is viewed there is block of data loaded from my site (specified to the ID).
Is this possible to create such application with facebook ? If no the what type of application is closest to this? My site users want to display their profiles from my site inside their facebook profiles , so facebook friends can see this.
If I understand you correctly you want to add some additional data on the users Facebook profile, something like if Stackoverflow would add their flair on the Facebook profile.
I don't think this is possible, but you have a few alternatives:
Make the user post out a link to his profile on your site to his Facebook Wall, more details here.
Integrate your site to the new Open Graph Objects. Open Graph Objects will create a box on the users profile for your application which shows the users activity in your application. You should check out the demos and documentation for more information about this.
The users enters his ID on my site and when user's profile is viewed there is block of data loaded from my site
You can't do anything like this, you will need to use the authentication flow provided by Facebook in order to get access to the Facebook user data and then tie up the Facebook user to "your user", see documentation.
When it comes to what type of app you should create, there is basically only one type of app with some different options. But you should focus on the "Facebook for websites" documentation.

How to get user profile in for in facebook?

How can I get profile information in facebook according to emailid using an API?
You cannot access Facebook information by querying according to an email address. It is not an indexable field. There is NO way to get Facebook user information using an email address. You must use name or username
The email fiel is NOT indexable.
That means you can not search for a profile by using the email field (That would be a privacy issue).
You can take a look here to get more details:
http://developers.facebook.com/docs/reference/fql/user
The facebook API, are well documented:
http://developers.facebook.com/docs/reference/api/user
If you can read Java go through this nice tutorial on accessing Facebook after authenticating using OAuth. It includes a basic example of fetching an user's profile details.