FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
321 stars 140 forks source link

Support for the channelUrl parameter of FB.init(). #114

Closed adurieux closed 11 years ago

adurieux commented 12 years ago

Description :

The Facebook developer's website highly recommends to create a channel.html file in order to address some Cross-Domain issues.

Todo:

Bug fix: no Feature addition: yes Backwards compatibility break: no Bundle tests pass: yes Fixes the following tickets: #113 References the following tickets: - External references : https://developers.facebook.com/docs/reference/javascript/

stof commented 12 years ago

@adurieux route name don't use the dot.

stof commented 12 years ago

@adurieux you did not push any of your fixes to github

adurieux commented 12 years ago

@stof : I just wanted to do all the suggested corrections before commiting again.

Thanks a lot for the code review. I am still worried about the potential escaping issue in Resources/views/initialize.html.twig. As soon as it seems good, I will update the documentation.

dustinwhittle commented 12 years ago

Any update?

lsmith77 commented 12 years ago

@stof or @kriswallsmith can you finalize the review?

stof commented 12 years ago

@lsmith77 apart from the 2 comments I did, it seems good as far as the code is concerned. Then, I cannot guarantee that the feature is implemented in the right way as I don't use FB at all

leek commented 12 years ago

This is alot of overhead to echo a <script> tag - why not just create the channel.php file within the bundle's resources? It would be installed to web/bundles/fosfacebook and then you could reference it as ://example.com/bundles/fosfacebook/channel.php.

That would change this PR from 109 adds to probably about 3 adds.

adurieux commented 12 years ago

@stof : just corrected missing items.

juliendidier commented 12 years ago

Is that a dead PR ?

buzzedword commented 11 years ago

Guys, can we get a final word on this PR? Facebook platform updates make it difficult to create rich application without a channel url.

dunglas commented 11 years ago

The PHP file in the Ressources directory is not a good idea. Deployment issues will happen (i.e. assets on a CDN). Please just use a .html file with cache settings in a .htaccess file or someting like that.

stof commented 11 years ago

@dunglas The php file is a PHP template for people using PHP templates instead of Twig. and it will not cause deployment issues unless your deployment setup is already entirely broken. Assets are meant to be in Resources/public. Resources does not contain only assets. It you upload the whole Resources folder to your CDN, you are exposing all your Twig templates, DIC config files or Doctrine mapping files (for XML and YAML), which is already an issue.

dunglas commented 11 years ago

@stof I'm aware of that. I was replying to @leek who was speaking about a self-contained PHP file (like recommended in the Facebook doc) in Ressources/public not about a template.

filipc commented 11 years ago

Any chances to merge this code?

Support for channelUrl param is needed due to issue with WindowsPhone authorisation (http://stackoverflow.com/questions/5778100/facebook-connect-showing-blank-popup-on-login-in-internet-explorer-8)

If any help needed please let me know.

dkorsak commented 11 years ago

+1

diegoholiveira commented 11 years ago

@adurieux this is ready to merge into master?

frak commented 11 years ago

So is this bundle dead? Two years from the original pull request and still this feature hasn't been merged...

diegoholiveira commented 11 years ago

@frak: it's not dead. I'll made some tests and merge it on the weekend.

lavoiesl commented 11 years ago

+1, I need this

lavoiesl commented 11 years ago

This was merged into the 2.0 branch, but this branch is only declared compatible with Symfony 2.0.x

Can you either merge it into master as well or update the composer.json of the 2.0 branch?

Thanks

diegoholiveira commented 11 years ago

I'll merge it into master...

Cethy commented 11 years ago

What about a documentation update too ? I just updated a sf2.0 project and it crash with a beautiful "Route "fos_facebook_channel" does not exist.". I assume a working channel.html and "fos_facebook_channel: pattern: /channel.html" in routing is enough ?

diegoholiveira commented 11 years ago

@Cethy, can you provide some documentation?

Cethy commented 11 years ago

My error came from the fact that I use custom routes, and the default route are never loaded. In this case (use facebook_initialize() & custom routes), don't forget to add :

fos_facebook_channel:
    pattern:  /channel.html
    defaults: { _controller: "FOSFacebookBundle:Facebook:channel" }

Not sure where to put this, can you handle it ?

diegoholiveira commented 11 years ago

I merge this resource into the master branch. Can someone help's me revising it?

@Cethy I add the instructions to import the route for support it. Take a look, please.

Cethy commented 11 years ago

@diegoholiveira Fine with me :)

bilaalsoidik commented 11 years ago

Hi! Just I have a problem, I have followed all instructions to install FOSFacebookBundle, but when I wonted to run it, I have an error in the routing. And when I went to look for the routing.yml file in FOSFacebookBundle/Resources/config/ , I didn't find it. I have this message when I want to lunch my app.

Cannot import resource "@FOSFacebookBundle/Resources/config/routing.yml" from "C:/Program Files/EasyPHP-DevServer-13.1VC9/data/localweb/FbGroupDataImport/app/config\routing.yml". Make sure the "FOSFacebookBundle/Resources/config/routing.yml" bundle is correctly registered and loaded in the application kernel class.

How can I resolve this problem? I'm sorry that I put this comment here. Thanks!

stof commented 11 years ago

this is totally expected because the routing.yml file indeed does not exist. The routing file of the bundle is routing.xml

bilaalsoidik commented 11 years ago

Thank you for response, but even routing.xml file, it dose not exist, there is no file named routing.* in config directory. I downloaded the bundle with composer. I don't understand, in the master brach on github.com it exist, but when I download the bundle with composer, I don't see it or I puts this exactly in the composer.json file { "require": { "friendsofsymfony/facebook-bundle": "1.2.*" } }

diegoholiveira commented 11 years ago

This is happening because are you using the 1.2 stable version and reading the documentation of the master branch, with is not stable. Read the docs for the stable version here: https://github.com/FriendsOfSymfony/FOSFacebookBundle/blob/1.2.1/Resources/doc/1-basic-usage.md

bilaalsoidik commented 11 years ago

Okay! Thank you very much @diegoholiveira