Facebook Page Tab doesn't show my content

2019-09-09 12:29发布

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: enter image description here

4条回答
淡お忘
2楼-- · 2019-09-09 13:02

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
查看更多
虎瘦雄心在
3楼-- · 2019-09-09 13:10

"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

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-09-09 13:15

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

查看更多
Fickle 薄情
5楼-- · 2019-09-09 13:16

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?

查看更多
登录 后发表回答