Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7687795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:46:58+00:00 2026-05-31T19:46:58+00:00

So I’m creating an application within a the CodeIgniter framework that works as a

  • 0

So I’m creating an application within a the CodeIgniter framework that works as a points system with Facebook. It basically will give you points for sharing, liking etc. I’m using the PHP SDK for authentication and it works great but unfortunately the iframe method of liking and sharing won’t work because I need to attach a Callback.

So I know there is the Javascript SDK which has the Like Button feature but can a callback be attached? And if so, can the Javascript and PHP SDK work together so you wouldn’t need to authenticate twice? Or is there a way to accomplish all of this strictly with the PHP SDK? I really need to be able to like and attach a callback to it. Thanks!

edit: Attached Javascript SDK code

<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '346032368781548', // App ID
      channelUrl : '//localhost/channel.html', // Channel File
      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      xfbml      : true  // parse XFBML
    });

    // Additional initialization code here
  };

  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     ref.parentNode.insertBefore(js, ref);
   }(document));
</script>

<fb:like send="true" width="450" show_faces="true" />
<script type="text/javascript">
    FB.Event.subscribe('edge.create',
        function(response) {
            alert('You liked the URL: ' + response);
            // Replace with the function that you want
        }
    );
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:46:59+00:00Added an answer on May 31, 2026 at 7:46 pm

    Yes, you can run a callback via a second parameter, and if you use Facebook JavaScript SDK with PHP SDK, you shouldn’t have any issues as long as the user is logged in and/or authorized. You have to, however add the Facebook Like button, and add this function like such:

    <script type="text/javascript">
        FB.Event.subscribe('edge.create',
            function(response) {
                alert('You liked the URL: ' + response);
                // Replace with the function that you want
            }
        );
    </script>
    

    If you use Facebook Ignited it will allow you to easily integrate the Facebook PHP SDK with CodeIgniter. It also extends the functionality giving you easy to use functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.