Click here to Skip to main content
15,067,839 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
First of all i want to do that users of my site will post comment to facebook profile/page/group feed posts i show in my site by javascript sdk this is my code -

          appId   : 'APPID',
          status  : true,
          cookie  : true,
          xfbml   : true

        FB.login(function(response) {
            if (response.status=='connected') {
                if (response.authResponse.accessToken) {
                   var token =response.authResponse.accessToken;
                        FB.api('/POSTID/comments?access_token='+token+'', 'POST',{ message:'test' }, function(response) {
                          if (!response || response.error) {
} else { alert("success"); } of codes

so everything works my facebook application setting's "Website with Facebook Login" section the site url is set as http://localhost/joomla.all i am doing in a joomla site module and i will install it in my all joomla websites.i installed in my one online site and when i try to post comment as a different user i get error as follows -

"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

that's because my fb application's site url is not matching with my online site url where i installed this it's look like i can only use the module in my one site by adding that site url in fb app's site url how to overcome this problem?? can i use javascript sdk without app id when my users will post comments to profile or page or group posts?? note that i am generating access token to achieve that and situation is that this module will be used in some other sites which is not mine too so is the problems.please help me all ways with details please.

Updated 17-Apr-13 4:21am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900