I Started working on Android Development for a while now. According to the tutorials im following im trying to retireve JSON info from the Twitter API...
As it was instructed in the tutorial, this is the code to use:
"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=write the username"
HOWEVER, i got a response saying that the API is no longer available and i should migrate to API v1.1.
Could anyone please help on what to do to replace the url i was instructed to use??
NOTE
When i used the new url from API v1.1 : "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2"
i get the following:
"{"errors":[{"message":"Bad Authentication data","code":215}]}"
Old Twitter API did not require Authentication for retrieving user_timeline, but v1.1 requires authentication to retrieve data(https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline). According to Twitter API document user authentication is required for all the API v1.1 requests.
You can read more about authentication here
https://dev.twitter.com/docs/auth/oauth#v1-1
Related
I'm stuck trying to call Google DecodeIntegrityToken API from my Android APP. There is no documentation or examples on how to do it.
I have completed the setup and managed to get an IntegrityToken up to this point.
The setup: https://developer.android.com/google/play/integrity/verdict
Here I found calling the API in LARAVEL: Decode integrity token using Google PlayIntegrity API
and this one in .NET: How to get a decoded Play Integrity API token using the Google Client API for .NET
But how can I call it from Java? There is no information. I can't find a way to call the API to decode the Integrity Token.
The response you can decode using Java based hosted service. The integrity token can be sent to the Google server from hosted service and you can verify the response received from google. Enable PlayIntegrity API in Google Cloud Platform against the app and download the JSON file and configure the code. Similarly, you should enable PlayIntegrity in Google PlayConsole
Please check my answer
For those who are looking for the node.js solution check my answer here
Decode integrity token using Google PlayIntegrity API
I'm trying to connect to Magento using the REST API and the Scribe Java library. The tutorials that I've followed (https://gmartinezgil.wordpress.com/2013/08/05/using-the-magento-rest-api-in-java-with-scribe/) seems slightly outdated and I can't get it to work with the current versions.
In the blog (and other tutorials), people are using the Verifier object from Scribe. This object does not seem to exist for me (version 4.1.0).
How does one receive the OAuth1AccessToken in scribe Java 4.1.0?
I have everything prior to this working, so I have the request tokens, the user is authorized, etc.
Thanks
facebook api v1.0 expires on April 30, 2015:
https://developers.facebook.com/docs/apps/changelog
We're using scribe (currently version 1.3.6) to do a login via facebook. We need to update to Facebook api v2.2, or later than v1.0
Does scribe support connection to facebook api v2.2 ?
If i look on the generated url which is sent to the user,
v1.0 version:
https://www.facebook.com/dialog/oauth?client_id=12345678901&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Findex.facebookoauthconnect%3Aauthorize&scope=email%2Cuser_birthday
If i understand right, i connect to the v2.2 api by including /v2.2/ like the following
v2.2 version(?):
...facebook.com/v2.2/dialog/...
Is that correct? At least this works for our scenario.
The URLs to facebook are defined in:
org.scribe.builder.api.FacebookApi
and are not manipulated later in the code, so that i think scribe supports only v1.0 facebook api. Is that correct?
Is it enough to insert the /v2.2/ into the url by ourself to connect to the v2.2 api?
Kind regards
David
Note: I never used Scribe since I have my own library written in-house.
The OAuth authorization process on Facebook hasn't changed, it's merely the API. Therefore, your request path will not be on /{object}/ (if using Facebook v1.0) but rather appended /v2.2/{object}/.
Scribe library merely allows you to do OAuth to the service providers easier for you. It does not link to ANY service providers specific API's, so you're free to change the API request path as you wish.
You will need to refer to the latest Graph API reference doc.
Example:
// getting user profile
OAuthService service = new ServiceBuilder()
.provider(FacebookApi.class)
.apiKey(YOUR_API_KEY)
.apiSecret(YOUR_API_SECRET)
.build();
OAuthService service = facebookServiceProvider.getService();
OAuthRequest oauthRequest = new OAuthRequest(Verb.GET, "https://graph.facebook.com/v2.2/me"); //See how this link is appended with v2.2 path!!!
service.signRequest(accessToken, oauthRequest);
Response oauthResponse = oauthRequest.send();
System.out.println(oauthResponse.getBody());
I suggest learning the upgrading changes from Graph v2.1 to Graph v2.2. You shouldn't worry about authentication process but rather the Graph URL.
I was trying to get contact list from yahoo for POC. It was documented that the there is need to send a GET request to the URL with the user's ID and returns the contact list in XML format. I tried the same but facing the authentication message 401 from browser, normal console java application and from jsp too I guess I must try it using the open social API package. Can anybody please guide or suggest the solution for this problem if possible please post any code sample for any similar application in JAVA as I found most samples are unclear and in JSON only.
Thank You
Yahoo recently released an SDK for accessing Yahoo Social services via Java:
http://developer.yahoo.net/blog/archives/2010/07/yos_sdk_for_java.html
socialauth is a java library that allows importing contacts from Google, Yahoo, Hotmail and from other providers too.
http://code.google.com/p/socialauth/
I develop facebook application in android
i want to log in to facebook via HTTPClient , teh user give me username and password and then i connect to facebook.com/login
i want to make like this code
Facebook: Getting Incorrect Signature (104) when Getting Session Key
but in android, i tried to do that but when i get the session, a XML contain invalid parameter returned
can any one help me?
Facebook released an official SDK for Android applications. See this post on their developers blog.
You might want to try implementing the Android Facebook:Connect Library:
http://wiki.developers.facebook.com/index.php/User:Android
It's not official - but it seems fairly stable for most practical uses (allowing connecting and FQL queries, etc.)