Facebook Page Tab doesn't show my content

好久不见. 提交于 2020-01-16 19:25:11

问题


I'm trying to show some html in a facebook tab page without success.... I'm new in facebook applications and I do not understand what is happening.
I've created a heroku app, to use your SSL, named https://sinatra-dev-test.herokuapp.com, this URL only shows a H1 with a "Teste" string.
In my Sinatra Application I have a get route, and a post route that redirects to get.
The heroku logs do not show nothing in particular, no one error or warning.

Here is a screenshot to my facebook app config:


回答1:


Sinatra has a protection for frame by default.

You need to use this:

set :protection, except: [:frame_options]

At your app.rb

This will allow you to use your website as a iframe. Read more at http://www.sinatrarb.com/intro.html#Configuring%20attack%20protection




回答2:


Are you seeing any error message when you try and view the app in the tab? Is your app in sandbox mode by any chance?




回答3:


Your 'secure page tab URL' and 'page tab URL' are both set to a HTTPS URL - you need the 'page tab URL' to be a HTTP URL.

Additionally, your server isn't processing a POST request correctly (or at least, is returning a blank page when I try) - the page load from Facebook will be a HTTP POST request with a signed_request parameter which gives your app details about the page and user currently loading the app

curl -i -F 'test=test' http://sinatra-dev-test.herokuapp.com
HTTP/1.1 100 Continue

HTTP/1.1 303 See Other 
Content-Type: text/html;charset=utf-8
Date: Wed, 11 Jul 2012 20:29:58 GMT
Location: http://sinatra-dev-test.herokuapp.com/
Server: WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
X-Frame-Options: sameorigin
X-Xss-Protection: 1; mode=block
Content-Length: 0
Connection: keep-alive



回答4:


"Your 'secure page tab URL' and 'page tab URL' are both set to a HTTPS URL - you need the 'page tab URL' to be a HTTP URL."

igy, it's not necessary to be in 'page tab URL' a HTTP URL



来源:https://stackoverflow.com/questions/11434095/facebook-page-tab-doesnt-show-my-content

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