Authentiate oauth 2.0 for an account

oauth
gnip
api

#1

Hello Team,

I want to get the other account tweeter impression from the account issued for engagement. As mentioned in http://support.gnip.com/apis/engagement_api/overview.html we can user oauth 2.0 to get authentication for the account.

Please help me with proper code we can use for this in PHP.


#2

The new docs clarify that language a little.

Engagement API customers are required to authenticate using app-user OAuth 1.0 in order to retrieve information about Tweets specific to the authenticating account or can use app-only OAuth 1.0 (or a bearer token) in order to retrieve the available information about any Tweet.

User authenticated API requests are only supported with OAuth 1.0. OAuth 2 (bearer token) can only be used in non-user contexts.


#3

Thanks Abraham,

I have authorized the @Storzzzcom account with @8WeekApp using Oauth1.0 and using Twurl as well and both process went successful.

Still it show error below tweet id: 1037709670960558080 is from @Storzzzcom and i while i use the @8WeekApp enterprise credentials it show below error.

[0] => Forbidden to access tweets: 1037709670960558080

Please have a look what is wrong still


#4

You can only use the Engagement API to analyze Tweet engagements for Tweets owned by the authenticated user. So, this error is correct, @8WeekApp should not be able to request engagement data on a Tweet posted by @Storzzzcom. You need to use the user token for @Storzzzcom to do that.


Engagement/Matrics API on GNIP
#7

Thanks andypiper,

Please can you send me some more detail what authentication actually needs to be use, there are too many authentication type and i tried already for the oauth 1.0 (login with twitter).

Please go through all steps i have done but no success!


#8

We explain the sign in with Twitter process on this page:
https://developer.twitter.com/en/docs/twitter-for-websites/log-in-with-twitter/guides/implementing-sign-in-with-twitter

Once you’ve completed all of the steps outlined on that stage, you will use the resulting access tokens in your call to the Engagement API to access the Tweet information of a @handle other than the one that owns the app that you are using.


#10

Thanks you LeBraat and Andypiper. This works fine. Thanks again for support.


#11

Awesome! Glad we could help. Let us know if you need anything else.