Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:57:54+00:00 2026-06-16T01:57:54+00:00

I am having trouble tagging friends in pictures using the Facebook API in android.

  • 0

I am having trouble tagging friends in pictures using the Facebook API in android. This is what I have at the moment

Bundle param;

    Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(),R.drawable.picture);
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);
    byte[] data = stream.toByteArray();

    AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook);
    InputStream is = null;
    param = new Bundle();
    param.putString("message", dataMsg);
    param.putString("filename", "Invite");
    String[] numArr = invitedNum.toArray(new String[invitedNum.size()]); 
    param.putStringArray("message_tags",numArr);
    param.putByteArray("picture", data);
    mAsyncRunner.request("me/photos", param, "POST", new SampleUploadListener(), null);

    Toast.makeText(context, "Picture posted to Facebok.", Toast.LENGTH_SHORT).show();

This uploads the picture and sets a message on it but does not tag anybody in the picture. Any ideas would be really helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:57:56+00:00Added an answer on June 16, 2026 at 1:57 am

    To tag users, you’d need to follow the approach outlined here:

    https://developers.facebook.com/docs/reference/api/photo/#tags

    So you would:

    1/ Upload the photo

    2/ Get the photo ID (should be returned if the upload was successful)

    3/ Make a call to this Graph API endpoint:

    PHOTO_ID/tags 
    

    and pass in the FB IDs in the tags parameter:

     tags=[{"id":"1234"}, {"id":"12345"}]. 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having trouble with Codekit/Compass. Know lots of people have had issues with this but
I'm having trouble updating the DOM when doing an AJAX post using JQuery. This
Having trouble figuring this one out.. I currently have a frmMain and a frmLoading..
Having trouble creating a static library in XCode4. I have been following this helpful
Having trouble framing this assertion in Rspec for my rails app. A User has
Having Trouble with Entity Framework. I have been populating EntityReferences with an EntityKey inorder
Having trouble to start a new activity after progressbar have loaded. Im getting stucked
Having trouble using foreach to output the contents of a mysql table. The table
Having trouble with this code, wondering if I'm trying to achieve something impossible. I'm
Having trouble with some select statements. I have 2 tables. sms_log and sms_messages. sms_log

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.