main-address not returned from linkedin api - php

I am using the javascript api to get the profile information from linkedin. For that the url passed is -
https://api.linkedin.com/v1/people::(~):(id,first-name,last-name,picture-url,main-address,headline,industry,summary,location,positions)
I am getting all the fields from this api except main-address. When I see the response in console it does not show the mainAddress field.
There is an address to that linkedin profile.
Does there need to have other field other than main-address?
Any help appreciated !
Thanks.

If you need the main address of the authenticated LinkedIn user, take a look to the 'r_emailaddress' scope permission.

Related

Getting Authorized User Details Using Twitter API using PHP Laravel

I could able to generate authorization URL and could able to trigger my callback API.
But how can I get the authorized user details such as first name, last name, id, profile pic etc?
I didnt find any solution on internet and I almost spent a lot of time on this.
Please help me to find out a solution.
I got these
{"oauth_token":"PVHUBxxxxxxxxxxxxxxx","oauth_verifier":"5vlkG3xxxxxxxxxx"}
I want to get the firstName,lastName and profile pic of this account using these keys.
Pease help me to solve this.
Thanks
You can use https://api.twitter.com/1.1/statuses/user_timeline.json end point using postman and provide your app credential and authorized user credentials with auth 1.0

How to read facebook timeline with Graph API?

I need to read facebookk timeline and some tutorial says me to read with API Graph and I use:
https://graph.facebook.com/***/posts?access_token=***
but when I use this code I obtain {data[]} . I don' know how I wrong. Anyone can help me?
You question is pretty broad.
Did you use the Facebook API explorer? Found here
Are you sure the token is valid?
I am pretty sure what you are doing wrong is your call above is un-versioned so it will default to v2.0+. Which means you can't query based on user name. Next if you are using a user Id in the middle *** it will return empty because that user hasn't authorized the app that got the token, and/or has decided to hide themselves from open graph calls. You can use a public page ID in that spot to get that page posts.
Give this a try
https://graph.facebook.com/ME/posts?access_token=***
Provided you have a valid token it should work with unversioned calls. I suggest you play with the API explorer linked above.

Can't get comment scope

I am working with the Instagram API and want to get permission to post comments on behalf of the users. But somehow it does not work.
The request link:
https://instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=token&scope=comments+likes
When this link is going to be opened, I get asked to give permission for basic information and liking, but not for commenting...
And now after I give permission and want to add a comment with the API, it returns a 400 error:
{"meta":{"error_type":"OAuthPermissionsException","code":400,"error_message":"This request requires scope=comments, but this access token is not authorized with this scope. The user must re-authorize your application with scope=comments to be granted write permissions."}}
What am I doing wrong? Is it not possible to get the comments scope? I do it like Instagram describes it on this link on the very bottom
Instagram Authentication
Did you complete the following form?
https://help.instagram.com/contact/185819881608116
It looks like you must complete the form before your app will have access to the POST comments endpoint.

Check if user like a page without creating facebook app

I have to check in my script if a user like a facebook page.
I would realize it without Facebook app. I would not create it.
I founded some examples, but they require a Facebook app, and that user gives it the correct permission.
Can you help me? Is it possible?
Thanks for any suggestion.
You need to use the Facebook API and ask for permission from the user to do this.
Resources:
Facebook API info
User info
If your application is an external website, then you need to use the Facebook API and ask for the user_likes permission + valid access and make a POST to USER_ID/likes/PAGE_ID
If your application is a canvas or a tab application, then you can use the signed_request parameters that Facebook send you.
https://developers.facebook.com/docs/howtos/login/signed-request/
https://developers.facebook.com/docs/reference/api/user/
Regards

How to post to facebook wall once I've got the access token

I'm making a facebook app and have got as far as getting the user to allow my apps permissions, which then generates a code. Then using this code to get an access token. So I now have a variable in my PHP script containing the access token. Now how do I use this to post to the users wall?
The easiest way to post a message on the wall is through the graph api. You require the publish_stream permission to post status messages. You can simply do a POST with the desired message and the access token.
See the official facebook documentation for more details: http://developers.facebook.com/docs/reference/api/status/
Facebook changes their API so often, it's best to read their docs, if those are up to date...
Check in IRC #facebook as well.
But basically, you pass that token in to the API call somewhere, somehow and it's in their docs somewhere.
Unless FB has decided you don't need it or ignores it or doesn't want to allow that this week.

Categories