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 7718453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:10:20+00:00 2026-06-01T03:10:20+00:00

I am curious if I can get some help with Open Graph since I

  • 0

I am curious if I can get some help with Open Graph since I can’t seem to make any sense out of the Facebook API that I have read.

Right now I have setup my Open Graph Application on Facebook. It has been approved. I am trying to submit my “objects” via the bundle params but I am curious how I setup a bundle param object like the following. Where myObject has multiple values associated with it.

Bundle params = new Bundle();
param.putString("myObject", ""); // My object has multiple values

I guess I really need to figure out how you submit something in the Bundle that has multiple properties associated with it. If anyone has any insight on this please help me out.

At first I had tried something like this.

Bundle myObject = new Bundle();
myObject("property1", "property1Value");
myObject("property2", "property2Value");
myObject("property3", "property3Value");
Bundle params = new Bundle();
params.putString("myObject", myObject); 

But in hindsight I figured out why this wouldn’t work.

Edit 1

Maybe this will shed some light. Keep in mind this is an Open Graph action which is not a part of the Graph API.

//Build recipe
JSONObject recipe = new JSONObject();
recipe.put("type", "myappns:recipe");
recipe.put("recipe_name", "Thai Island");
recipe.put("cook_time", "1hr. 30min.");

//Build cookbook
JSONObject cookbookParams = new JSONObject();
cookbookParams.put("type", "myappns:book");
cookbookParams.put("title", "Hot & Spicy");
cookbookParams.put("description", "This book consists of hot & spicy foods");
cookbookParams.put("recipes", new JSONArray().put(recipe));


Bundle params = new Bundle();
params.putString("cookbook", cookbookParams.toString());
AsyncFacebookRunner request = new AsyncFacebookRunner(facebook);
request.request("me/myappns:used", params, "POST", new addToTimelineListener(), null);

Here is a question though as I have been digging more into the Open Graph system. I believe I need to actually have a website setup somewhere, is this correct? I was lead to believe through the introductory documentation of Open Graph that I could create and use my Facebook application on Android without the need of any website. That is use the Open Graph system, I know I can use the application to post feeds and what not which I have done successfully.

Thanks again!

Edit 2

Dont even worry about replying I understand what my problem was now…I have to have a website somewhere hosting a Facebook application for the posts to link back too. Makes perfect sense, I haven’t seen where the documentation was very direct about this…oh well now I know.

  • 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-01T03:10:21+00:00Added an answer on June 1, 2026 at 3:10 am

    I use this code to publish on wall for multiple object properties.

         private void publishPhoto(String imageURL) {
        Log.d("FACEBOOK", "Post to Facebook!");
    
        try {
    
            JSONObject attachment = new JSONObject();
            attachment.put("message",text);
            attachment.put("name", "MyGreatAndroidAppTest");
            attachment.put("href", "http://stackoverflow.com/users/909317/sunny");
            attachment.put("description","Test Test TEst");
    
            JSONObject media = new JSONObject();
            media.put("type", "image");
            media.put("src",  imageURL);
            media.put("href",imageURL);
            attachment.put("media", new JSONArray().put(media));
    
            JSONObject properties = new JSONObject();
    
            JSONObject prop1 = new JSONObject();
            prop1.put("text", "Text or captionText to Post");
            prop1.put("href", imageURL);
            properties.put(text, prop1);
    
            // u can make any number of prop object and put on "properties" for    ex:    //prop2,prop3
    
            attachment.put("properties", properties);
    
            Log.d("FACEBOOK", attachment.toString());
    
            Bundle params = new Bundle();
            params.putString("attachment", attachment.toString());
            facebook.dialog(MyProjectActivity.this, "stream.publish", params, new DialogListener() {
    
                @Override
                public void onFacebookError(FacebookError e) {
                    // TODO Auto-generated method stub
    
                }
    
                @Override
                public void onError(DialogError e) {
                    // TODO Auto-generated method stub
    
                }
    
                @Override
                public void onComplete(Bundle values) {
                    final String postId = values.getString("post_id");
                    if (postId != null) {
                        Log.d("FACEBOOK", "Dialog Success! post_id=" + postId);
                        Toast.makeText(MyProjectActivity.this, "Successfully shared on Facebook!", Toast.LENGTH_LONG).show();
    
                    } else {
                        Log.d("FACEBOOK", "No wall post made");
                    }
    
                }
    
                @Override
                public void onCancel() {
                    // TODO Auto-generated method stub
    
                }
            });      
    
        } catch (JSONException e) {
            Log.e("FACEBOOK", e.getLocalizedMessage(), e);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a curious question but is there any programs that can help/aid you when
I'm currently using NVelocity to render some email templates. I'm curious how I can
I'm curious to get some feedback and ideas on how one could go about
I am curious to know if we can do this in Powershell. with Out-File
I'm curious to get some input on a chunk of code I've been working
I am just curious if someone can get me pointed in the right direction
Edit: I'm really just curious as to how I can get this regex to
I've always been curious: how can I perform arithmetic operations on very long decimals--for
I was curious to know how I can round a number to the nearest
I've always been curious to see if I can show, hide or change a

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.