Im trying to work on an android application which simply retrieves pictures from the api. Im trying to use retrofit but im consufed how to use it. also I dont understand how to get the access tokens? Do i need the user to login? Cant I simply get images from instagram not particularly related to any user?
I tried something like
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mButton = (Button) findViewById(R.id.button);
mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse("https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code"); // missing 'http://' will cause crashed
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
this leads me to a login page and then it promts me to put in user details and after that gives me some sort of authentication error.
I cannot seem to understand the insta documentation