Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: How to upload photo on flickr using flickrj-android-2.0.0 android library
    primarykey
    data
    text
    <p>I an using flickrj-android-2.0.0 and follow the OAuth flow. I am getting the access-token and secret also but when I try to upload the photo on flickr I am getting the this error:</p> <p><strong>com.googlecode.flickrjandroid.FlickrException: 99: Insufficient permissions. Method requires write privileges; read granted</strong>.</p> <p>Even I have changed the permission to write when I am creating my api-key and secret, but still getting the same error.</p> <p>For uploading photo I am using the below code please help me to solve this out I am really stuck at this part.</p> <pre><code>public void uploadPhoto(OAuth... params) throws ParserConfigurationException { OAuth oauth = params[0]; OAuthToken token = oauth.getToken(); RequestContext requestContext = RequestContext.getRequestContext(); OAuth auth = new OAuth(); auth.setToken(new OAuthToken(token.getOauthToken(), token .getOauthTokenSecret())); requestContext.setOAuth(auth); Uploader up = new Uploader(FlickrHelper.API_KEY, FlickrHelper.API_SEC); UploadMetaData uploadMetaData = new UploadMetaData(); uploadMetaData.setTitle("hello world"); try { Drawable d = getResources().getDrawable(R.drawable.icon); // the drawable (Captain Obvious, to the rescue!!!) Bitmap bitmap = ((BitmapDrawable) d).getBitmap(); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream); byte[] bitmapdata = stream.toByteArray(); System.out.println("Bitmap value= " + bitmapdata); userIcon.setImageBitmap(bitmap); up.upload("Hello From Emulator", bitmapdata, uploadMetaData); } catch (FlickrException e) { e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } } </code></pre> <p>Thanks...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload