Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript PHP FacebookAPI , +
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 -
 
FB.init({
          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"); }
........rest of codes
 
so everything works fine.in 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 module.so 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 box.so 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.
 
thanks
Posted 17-Apr-13 1:59am
Edited 17-Apr-13 5:21am
v2

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



Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 17 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100