How can I include a link in a FB app request?

2020-05-01 08:01发布

So the question is when my app sends an app request how can I include a link inside of it?

This is what I am searching for. Marked with red. enter image description here

Been searching over the web but couldnt find nothing appropriate. If I try with a href.. it doesn't work. Maybe I should use some FB syntax for making links?

Thank you for any answers!

2条回答
放荡不羁爱自由
2楼-- · 2020-05-01 08:33

my previous answer is still valid for current fb js sdk:
however: the exact answer is: put a link in request body is possible with old version: "rendering fbml"

<fb:serverfbml width="650px">
  <script type="text/fbml">    
        <fb:fbml> 
            <fb:request-form
                    action="http://myapp.com/myitem=123"
                    method="Post"
                    invite="false"
                    content="This is my item"
                    target="_self">
                    <fb:multi-friend-selector
                            showborder="false"
                            actiontext="See my item"
                            rows="4"
                            cols = "4"></fb:multi-friend-selector> 

            </fb:request-form> 
        </fb:fbml>
  </script>
</fb:serverfbml>
查看更多
够拽才男人
3楼-- · 2020-05-01 08:37

The link in the message created automatically by the facebook, because link is a name of that user's name or friends and similar cases(i.e. I am test user of app, so fb mark me as test user )

Otherwise:

It's not possible attacht link in apprequest as it is like:

                   FB.ui({
                        method: "apprequests",
                        display: "iframe",
                        message: 'myMessage',
                        data: '123'
                    })

Even if you try put your url in message field, tags will be encoded

查看更多
登录 后发表回答