开发者

fb:comment does not work on my application

开发者 https://www.devze.com 2022-12-17 20:40 出处:网络
I\'m a new Facebook developer. I want to add comments box to my application and I follow the tutorial in Facebook wiki. It\'s not work in my application.

I'm a new Facebook developer. I want to add comments box to my application and I follow the tutorial in Facebook wiki. It's not work in my application.

My canvas callback URL is http://122.155.0.71/~facebook/ and I upload xd_receiver.htm to root directory. I am using the following code

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js?2" type="text/ja开发者_C百科vascript"></script>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
<fb:comments> </fb:comments>
<script type="text/javascript">FB.init("b6e07896a1d0889d9784dea150802587", "/xd_receiver.htm");</script>

in my application. It not show up. When I view this page with Firebug. I see <fb:comments> </fb:comments>. I don't know about xid, where can I create it?


This tag allow user to post comments in my FBML and display these comments on their Wall. But for some cause, comments can not be displayed in users' Wall even they checked the box "Post comment to my Facebook profile". I don't know what was wrong with the code

I really appreciate if you can help.

This is my FBML: click here to view

And this is my code:

<fb:comments xid="comment" " canpost="true" candelete="false" numpost="10" publish_feed="true"><fb:title>Comment</fb:title></fb:comments>


I'm working on an iFrame XFBML application and had trouble getting this to work until I realized what it meant for the fb:comments tag to be an "unsupported" XFBML tag. To get this working, you have to wrap the fb:comments call in fb:serverFbml tags.

Here's the full code:

<fb:serverFbml style="margin-top:15px;">  
            <script type="text/fbml">  
                <fb:fbml> 
                    <fb:comments xid="project_1" publish_feed="false" showform="true" canpost="true" numposts="50" width="467px"><fb:title>Comment on this project</fb:title></fb:comments>
                </fb:fbml>
            </script>
        </fb:serverFbml>


if you want comment box like this in my app http://apps.facebook.com/pollonfb then it very easy ,

just use following code

     <fb:comments xid="Identifier" canpost="true" candelete="false"     returnurl="http://apps.facebook.com/myapp/titans/"> 
      <fb:title>Talk about the Titans</fb:title> 
       </fb:comments

XId id simply a unique string to identify your comment box uniquely , For example in my app there is a comment box for each poll , and poll name is xid for their comment box.

0

精彩评论

暂无评论...
验证码 换一张
取 消