Facebook - Heroku - Tab Issues - facebook

having a problem using Facebook's Heroku Integration.
I've got a business page, which I want a "Facebok Tab" on, which links to a schedule.
From what I understand, I've had to setup a facebook app in the developer area, and setup the canvas's to point to my hosted files. which are located at https://warm-mist-9082.herokuapp.com/ my facebook namespace for the app is currently setup as https://apps.facebook.com/weblessoncrashes/.
Inside the app I've setup the Tab url as https://warm-mist-9082.herokuapp.com/lessons.php
So theoretically when I click my tab ( https://www.facebook.com/WebIsEasy/app_388846884472817 )
it should load the contents of lessons.php which is
<html>
<head>
<title>hihi</title>
</head>
<body>
nonono
</body>
</html>
however. What you in reality will see is just a facebook frame with a blank canvas within.
I have tried varying the tabs to use the facebook namespace, and checked all the SSL certs and entries are correct.
I've now come to a stand still.
Any help would be perfect!
Thanks

Related

How to skip the welcome page and start Strapi right from /admin (login) page?

I've successfully deployed a Strapi app to a VPS (Ubuntu, nginx, etc.) and it works fine. What I want to do now is to redirect a user right to the /admin page. I mean now, after entering https://strapi.my-domain.com in a browser's address panel, user gets the standard welcome page like so:
welcome page
But I want a user to see Strapi's /admin page right after he/she entered https://strapi.my-domain.com in a browser's address panel. Could someone please give any advice how to do that?
I was exploring strapi v4 document for similar problem and found this solution.
Redirecting landing page to admin panel
If you do not wish to have the default landing page mounted on / you can create a custom ./public/index.html using the sample code below to automatically redirect to your admin panel.
✋ CAUTION
This sample configuration expects that the admin panel is accessible on /admin. If you used one of the above configurations to change this to /dashboard you will also need to adjust this sample configuration.
Path — ./public/index.html
<html>
<head>
<meta http-equiv="refresh" content="0;URL='/admin'" />
</head>
</html>
Source: Strapi v4 Document

Facebook Register Plugin not showing up?

I am trying to implement Facebook Register Plugin on my website for landing pages.
I am following this guide:
https://developers.facebook.com/docs/plugins/registration/v2.0
I've written following code:
<div id="registration">
<iframe src="https://www.facebook.com/plugins/registration?client_id=660604224016242&redirect_uri=http://automaton.in/store_user_data.php?&fields=[{"name":"name"},{"name":"email"},{"name":"password"},{"name":"gender"},{"name":"birthday"}]">
</iframe>
</div>
But nothing is showing up instead of a box with border.
I've also created my facebook app with app-id 660604224016242.
Also, I am running my site locally without a local server! Do I need to run this on a server?
Please help me, I really need to implement this plugin!

Is it possible to put an iframe inside a Facebook page tab?

According to the Facebook developer roadmap, it will soon be possible to put iframes inside page tabs but it's not yet available. I came across this Store Locator on Coach page which uses an iframe to display a Google map inside a tab :
http://www.facebook.com/Coach?v=app_168904438199&ref=ts
Looking at the source code, I see the map really is inside an iframe. How is this possible?
in STATIC FBML pages you CAN'T USE IFRAMES - no matter what FBML code you put in there, facebook have specifically made the code not work in in business page/tab static fbml pages - my guess is so they can prevent people setting up Amazon stores or other content that uses IFrame (spammers and spyware often use iframes) - the updates are in their 2010 wiki - so it's probabley also a security thing.
I frames can still be used on developers canvas pages apparently but the customer has to click on an image for it to activate rather than the iframe automatically loading - again this is probably a security issue to prevent driveby downloads - where zwinky and similar toolbars are forced onto people computers in the background via iframes without their knowledge.
However some say it does work although you need a user to click on it before it works. if you can live with that then go for it.
<a onClick="outside_location.setInnerFBML(location_two);" style="cursor: pointer;"><center>→our website</center></a><div id="outside_location"> <fb:iframe width="730" height="400" frameborder="0" src="http://www.fborder.com/" /> </div>
<fb:js-string var="location_two"> <fb:iframe width="730" height="600" frameborder='0' src='http://www.fborder.com/' /> </fb:js-string> <script type="text/javascript" charset="utf-8"> var outside_location = document.getElementById('outside_location'); </script>
check out this post. people have got it to work. and some say it wont work for the obvious reasons. such as security and so on. but give it a go regardless.
http://www.facebook.com/topic.php?uid=4949752878&topic=7081
PK

How Do We Let Users Add Our Application As A Tab On Their Profile?

We currently have an iframe-based Facebook canvas application in the works. The canvas portion is working fine and doesn't really touch the Facebook API at all, since we don't really need any permissions from users in terms of accessing their social graph; the data we're using comes entirely from outside of Facebook.
What we would like to do is allow users to add an FBML version of our app to their profiles as a tab. However, it isn't clear how we are supposed to go about enabling that functionality using the current Facebook APIs.
The canvas page and callback settings are set up and working correctly, and we currently have a tab name and URL set up in our Application Settings (and hitting the tab URL directly will load our minimal test page), but there's no obvious way to offer users the ability to add this tab to their profiles.
Our initial thought was that we would need to add our own "Add Profile Tab" button in xfbml as mentioned at http://wiki.developers.facebook.com/index.php/Fb:add-profile-tab
But even when we reduce the iframe to something as barebones as
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
<fb:add-profile-tab></fb:add-profile-tab>
<script type="text/javascript">
FB.init("<our secret key>", "xd_receiver.htm");
</script>
</body>
</html>
the xfbml element fails to render. Safari and Chrome both list the following error in the console: "Unsafe JavaScript attempt to access frame with URL [our app url on facebook] from frame with URL [URL our iframe loads from]. Domains, protocols and ports must match."
We do have the Connect URL pointing at our app in the Connect tab of the application settings page. The xd_receiver.htm file is located in the same directory as the iframe page and its contents are
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script>
</body>
</html>
which seems to be what all of the relevant documentation recommends. The browser is definitely loading it as verified through the relevant debugging panes (web inspector, firebug, etc).
So the question is, is this the proper way of going about adding "add to profile tab" functionality to our application? If so, how do we resolve the cross-domain error? If not, what should we be doing instead? The current documentation seems to focus heavily on the Graph and Authentication APIs, neither of which really mention profile tabs.
In your Application settings, ensure these are set:
Canvas >
Canvas Page URL
Canvas Callback URL
Profiles >
Tab Name
Tab URL
The Tab request will go to {Canvas Callback URL}/{Tab URL}. Then something like this should work: http://apps.facebook.com/fbrelll/xfbml/fb:add-profile-tab
That's using the updated JS SDK. I can't post more links, but the developer site and github repository have useful information about the SDK.
It turned out that <fb:add-profile-tab> simply doesn't render without the user having first allowed the app to connect to them via something like <fb:login-button>

Facebook IFrame on page canvas?

Hey guys, I have developed a small site that i would like to embed into a tab on a facebook page.
Previously I used this code to load in an iframe, it worked great:
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Link 1</a> | <a class="red" onClick="outside_location.setInnerFBML(link_2);" style="cursor: pointer;">Link 2</a>
<div id="outside_location"></div>
<fb:js-string var="link_1"><fb:iframe width="760" height="1280" frameborder='0' src='http://www.WebWhispers.in' /></fb:js-string>
<fb:js-string var="link_2"><fb:iframe width="760" height="1280" frameborder='0' src='http://google.com/' /></fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = d
document.getElementById('outside_location');
</script>
However, it has stopped working. I dont think facebook allows iframe inside of pages, only applications.
How can I load this page in without learning FBML? The site uses Jquery so I cant use FBML anyway.
I know applications can use iFrames, can I make it an application and then embed the application into a page tab somehow?
No. Tab pages can not contain iFrames. They must be written using FBML and FBJS.
One reason for this is that Facebook does not want to enable Tab pages to detect who looks at them. All requests (including images) on tab pages are proxied through Facebook for this reason. If iframes were allowed then the application would be able to detect who looked at it, which would present a privacy issue for Facebook users.
This is either a policy change by Facebook or, more likely, a bug. I say it's unlikely to be a policy change as it throws a script error, whereas a policy change would more likely strip the code out before it's rendered.
There's a bug report you can add votes to and follow here.