Sina Weibo API PHP demo not working?

940 Views Asked by At

I am trying to use Sina Weibo's API but have not been able to authenticate with oAuth2. I downloaded the demo for the V2 of the SDK from http://code.google.com/p/libweibo/ but when i try it all i get is:

array
  'oauth_token' => string '5e24ba793881fb7d4xxxxx' 
  'oauth_token_secret' => string '215ccbf8009f0f03a7831axxxxxx'
  'user_id' => string '22191xxxxx'

According to the documentation i should be getting an access token with an expiration date, like:

{"Access_token": "SlAV32hkKG", "expires_in": 3600}

When i try to use the oauth_token get it complains saying it is not a valid token.

Does anyone know what i am doing wrong?

thanks in advance.

1

There are 1 best solutions below

0
On

While there are parameters auth_token and oauth_token_secret, it should be an OAuth 1 request token, not OAuth 2.0 access token.

I don't know about libweibo, were you running the correct demo?