FBML wallpost by clicking on image or button

Posted by psaha on Stack Overflow See other posts from Stack Overflow or by psaha
Published on 2011-02-06T07:20:00Z Indexed on 2011/02/06 7:25 UTC
Read the original article Hit count: 184

Filed under:
|

Hello, 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?

© Stack Overflow or respective owner

Related posts about facebook

Related posts about fbml