Skip to content

Instantly share code, notes, and snippets.

@arthurnn
Created September 4, 2012 19:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurnn/3625085 to your computer and use it in GitHub Desktop.
Save arthurnn/3625085 to your computer and use it in GitHub Desktop.
Login example using 500px android sdk
public class LoginActivity extends Activity implements XAuth500pxTask.Delegate{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
XAuth500pxTask loginTask = new XAuth500pxTask(this);
loginTask.execute(getString(R.string.px_consumer_key), getString(R.string.px_consumer_secret),"username","pass");
}
@Override
public void onSuccess(AccessToken result) {
Log.w(TAG, "success "+result);
}
@Override
public void onFail(FiveHundredException e) {
;
}
}
@tsafs
Copy link

tsafs commented Dec 14, 2013

500Exception :-) Sweet ^.^ Nice work there!

@arshadalisoomro
Copy link

That's cool, I was searching to use 500px API and found this as a cool lib, Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment