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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:28:30+00:00 2026-05-23T22:28:30+00:00

I’m creating one facebook application with FBML. What I want is: I have several

  • 0

I’m creating one facebook application with FBML. What I want is:
I have several images like,

<fb:tag name="img">
<fb:tag-attribute name="src">http://My_Img_Url_1.jpg</fb:tag-attribute>
</fb:tag>
<fb:tag name="img">
<fb:tag-attribute name="src">http://My_Img_Url_2.jpg</fb:tag-attribute>
</fb:tag>

While I click on the image it should open one popup “post to wall” or “Post to your Friend’s wall” with the corresponding image My_Img_Url_n.jpg.

I can use FBML share button like:

METHOD-1

<fb:share-button class="meta">
<meta name="title" content="Image_TITLE"/>
<meta name="description" content="Image_Descrip"/>
<link rel="image_src" href="http://My_Img_Url_1.jpg"/>
<link rel="target_url" href="Some_Target_URL"/>
</fb:share-button>

OR,

METHOD-2:
I can call fb:ui

    <script>
FB.init({ 

 appId:'111111111111111', cookie:true,

    status:true, xfbml:true 
 });

 FB.ui({ method: 'feed', 
 name: '',
 link: '',
 picture: 'http://My_Img_Url_1.jpg'
 });
</script>

Now the questions are:

  1. If I click on any image it will call either METHOD-1 or METHOD-2 and it will popup with that image. How can I do that?
  2. If I use <fb:multi-friend-input /> for posting to friend’s wall, How can I do?
  • 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-05-23T22:28:31+00:00Added an answer on May 23, 2026 at 10:28 pm

    I would go with option 2 as FBML is going to be deprecated soon (https://developers.facebook.com/docs/reference/fbml/).

    To sum up, initialize the JS SDK, make sure that your user is logged in and then wrap the FB.ui call with a new function. Then write out your images to the page in HTML and assign the click event to call your new Javascript function.

    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <script>
      // Initialize the Facebook Javascript SDK
      FB.init({
        appid: 'YOUR_APP_ID_HERE',
        status: true,
        cookie:true
      )};
    
      //Let's grab the userId for the user that is logged in
      //If you user is not logged in, redirect or prompt them to login/install the app.
      var userId = null;
      FB.getLoginStatus(function(response) {
        if (response.session) {
          uid = response.session.uid;
        }
        else {
          //Redirect or prompt to login with FB.login(), etc.
          //https://developers.facebook.com/docs/reference/javascript/FB.login/
        }
      });
    
      //Create your function to post to the users wall
      function postToWall(userId, imageURI, linkURI, name) {
        FB.ui({ method: 'feed',
          to: userId,
          name: name,
          picture: pictureURI,
          link: linkURI
        }, postToWallCallback);
      }
    
      //Create your callback function, this will be called when the user sends or closes the
      //Feed Dialog
      var postToWallCallback = function(response) {
         //For testing, let's alert out the contents of the response
         var responseStr = '';
         for(var item in response)
           responseStr += item + "=" + response[item] = "\n";
    
         alert(responseStr);
      }
    </script>
    
    <!-- Now print your image to the page and wrap it in an anchor tag that calls your Javascript function -->
    <a href="#" onclick="postToWall(uid, 'my_great_image.jpg', 'my_great_site.jpg', 'My Great Name');">
      <img src="my_great_image.jpg" />
    </a>
    

    This example will post to the users wall. If you want to post to another users wall, you’ll first need to grab the current users friends IDs with FB.api(‘me/friends’, myGreatCallback) (see https://developers.facebook.com/docs/reference/javascript/FB.api/) and then pass this into postToWall()

    I wrote this without trying to run it, let me know if you run into any any errors ;). You can find more information on the Facebook JS SDK at: https://developers.facebook.com/docs/reference/javascript/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't

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.