[TYPO3-english] initializing facebook javascript from main page sdk for iframe autoresizing
siddhant tewari
siddhant.tewari at gmail.com
Thu Mar 10 12:30:22 CET 2011
Hi,
Many thanks for the reply. I tried what you suggested but i am
still facing the same issue. I think the problem is the javascript
requires data from php code and what is happening is php code is not
working inside the tag.
The code that i have to write is :-
<script>
window.fbAsyncInit=function()
{
FB.init({appId:'<?=$facebook->getAppId()?>',session:<?=json_encode($session)?>,status:true,cookie:false,xfbml:true});
FB.Event.subscribe('auth.login',function(){window.location.reload();});
FB.Canvas.setAutoResize();
};
(function()
{
var e=document.createElement('script');
e.src=document.location.protocol+'//connect.facebook.net/en_US/all.js';
e.async=true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Thanks in advance.
regards
siddhant
On Thu, Mar 10, 2011 at 12:46 AM, Philipp Gampe
<typo3.lists at philippgampe.info> wrote:
> siddhant tewari wrote:
>
>> Please tell where should i put this code as i cannot figure out how to
>> add ones own javascript functions inside typo3.
>
> In you TypoScript template:
>
> page.includeJS.facebook (
> code without <script> tags
> )
>
> Best regards
> --
> Philipp Gampe – PGP-Key EF45DD31
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list