Getting Authorized User Details Using Twitter API using PHP Laravel - php

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

Related

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.

Using WebEX API with PHP

I am a beginner to using Webex API. I went through the documentation and couple of links(How can I use the WebEx URL/XML API to register a user for an event?) for an understanding of how it works. But while trying to use it, I get some errors and I am not receiving the intended result. If someone could give me a brief introduction on how it works, it would be great.
I want to access the login page in the webex API. By documentation, it goes of the name (p.php?AT=LI) and I tried to access the same using WebEX ID and Password which are the mandatory fields(as given in the documentation), I did not include the back URL. While giving this thing, I am receiving this error AT=LI&ST=FAIL&RS=UnknownATCommand.
Also I have these details. I have WebEX username, password, site ID and Partner ID. By WebEX ID, what does it mean ? Does WebEX ID and Partner ID one and the same?
Any help on this topic is highly appreciable.
Thanks & Regads,
Ramkumar
if you want to use Webex Xml API,
Your XML headers must have these elements
<header>
<securityContext>
<siteID>xxxx</siteID>
<webExID>siteadmin</webExID>
<password>password</password>
</securityContext>
</header>
I think you use URL API, its different

main-address not returned from linkedin api

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.

Problem using Linkedin API

I am using linkedin api to get info about the logged in user. I am able to get firstname and lastname, picture etc., It works fine. But I am not able to get recommendations. I am able to get number of recommenders using num-recommenders.
I am not getting **recommendations-received** according to http://developer.linkedin.com/docs/DOC-1061. I printed out the json response no recommendations Object for the user.
I appreciate your help.
For unfortunate reasons, if you want to get access to that field, you need to replace IN.API.Profile().fields("firstName","lastName","recommendationsReceived") with IN.API.Raw("/people/~:(first-name,last-name,recommendations-received)").
This is a good thread to read on the LinkedIn Developer forums: http://developer.linkedin.com/message/8805

Getting the user_id through Foursquare Api V2

I'm working on a foursquare integration for a social good website, and I have everything working as I want it to, however I want to retrieve and store users foursquare user_id's so others can search for their friend. I've been searching all day, but I can't seem to find an end point, am I missing something? Or does this has to be done through user search? What is then best to use, as I have their email, and full name.
I am using jmathai's foursquare-async php libary. I think it should be easy but I just can't figure it out.
I've found the solution. To get an users' details you should use the end point "users/self". I had tried this before but got an error message. I think that was related to something else now.
After authenticating two lines are simply enough:
<?php
$fsObj->get("/users/self");
print_r($creds->response);
?php>
This gives an json array containing all relevant information on the user, including last checkins, name, and id. 'self' can here also be replaced by any user id you're authorized for on that moment.
For more information I'd recommend to visit Foursquare Api website

Categories