Magento ScribeJava access token issue - java

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

Related

Using OAuth2 in dropbox API

I'm using the Dropbox API in my Java desktop application. I implemented the authorization process with the redirect to localhost to get the access token.
Everything works perfect so far but if I later try to connect to Dropbox to share some files, an exception is thrown:
com.dropbox.core.DbxException$BadRequest: {"error": "v1_retired"}
So I think the retrieved access token is only an OAuth1 token. In the API bundle I found a OAuth1Upgrader to convert the token. But that seems a bit too complex.
So my question: Is there a way to get an OAuth2 token immediately during the authorization process?
Dropbox deprecated their v1 API on Sept 28th (see this post). All API calls from that day forward to v1 endpoints return a 400 error with the message:
{“error”: “v1_retired”}
as happened here.
They published a migration guide here. Reading through it, there's a mapping between the v1 endpoint you're probably using and the v2 endpoint you should be able to use to get the OAuth2 token:
/1/oauth2/authorize:/oauth2/authorize

Twitter JSON API in Android Development

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

Twitter4j and authenticating to Twitter

For the moment I'm just trying to get up a simple driver in Java to hook into the Twitter streaming API and gather some tweets. But the sample code provided on the twitter4j site doesn't work and it provides little direction as to how to properly authenticate to Twitter.
For now this is what I have (literally copied from the site):
http://pastebin.com/7udeFT9i
I did it programmatically this time, but obviously it doesn't authenticate with nothing but *'s. But I'm not sure what values to put into the ConfigurationBuilder. I've seen some that have hardcoded values and others that call a getter from a Twitter instance, but in general I'm just not sure what Twitter needs for me to be able to access the stream.
Use Scribe -
https://github.com/fernandezpablo85/scribe-java
You need to use OAuth to access twitter programmaticly. You should start with the Twitter OAuth docs:
https://dev.twitter.com/docs/auth/oauth/faq

using sardine for accessing a sharepoint website from a java application

SardineFactory.begin(username, password);
sardine.exists("http://mydomain.sharepoint.com/TeamSite/Documents");
I thought sardine can login auto but it returns 403 error.
I didn't use sardine and SharePoint Online before.
Remote Authentication in SharePoint Online Using Claims-Based Authentication
I know i should do something else but don't know how.
Anyone can help me?
The SharePoint is most likely using Claims-Based Authentication, which is a nightmare to negotiate and authenticate through using Java.
Most solutions I've seen from others (although I have not yet seen a working demo) claim you have to use a .NET "mediator" in a non-CBA environment that your Java app can communicate with, and the "mediator" will in turn more easily get through the CBA authentication routine (keeping things within the .NET family).
Being stubborn, I am working on a pure Java solution and will post if I ever get it working.

Login to facebook in android using REST API

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.)

Categories