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

旧时模样 提交于 2019-12-02 15:14:30

问题


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.

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!


回答1:


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




回答2:


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>


来源:https://stackoverflow.com/questions/6994833/how-can-i-include-a-link-in-a-fb-app-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!