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

  • Home
  • SEARCH
  • 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 6623531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:32:37+00:00 2026-05-25T21:32:37+00:00

My client wants to display popup window with some coupon codes when some one

  • 0

My client wants to display popup window with some coupon codes when some one clicks the like button of his shops facebook fan page. He is currently using the static fbml. I never worked with fb pages before. So know nothing about there api. I prefer javascript if possible. Or for anything else please explain step by step. Thank you in advance.

  • 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-25T21:32:37+00:00Added an answer on May 25, 2026 at 9:32 pm

    There is only one way to do this. With a landing page and it checks to see if the page is liked or not. You are going to have to create an application by going to http://developers.facebook.com/apps. Tis will allow you to create a new landing page. You will need a server to host it on or use the free cloud service that they now provide. The app will need to be created with one of the SDK’s from https://developers.facebook.com/docs/sdks/. With PHP to check if someone likes the page you use code like

    <?php
    function parsePageSignedRequest() {
      if (isset($_REQUEST['signed_request'])) {
      $encoded_sig = null;
      $payload = null;
      list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);
      $sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
      $data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));
      return $data;
      }
      return false;
    }
    function parse_signed_request($signed_request, $secret) {
      list($encoded_sig, $payload) = explode('.', $signed_request, 2); 
      // decode the data
      $sig = base64_url_decode($encoded_sig);
      $data = json_decode(base64_url_decode($payload), true);
      if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
        error_log('Unknown algorithm. Expected HMAC-SHA256');
        return null;
      }
      // check sig
      $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
      if ($sig !== $expected_sig) {
        error_log('Bad Signed JSON signature!');
        return null;
      }
      return $data;
    }
    function base64_url_decode($input) {
      return base64_decode(strtr($input, '-_', '+/'));
    }
    if($signed_request = parsePageSignedRequest()) {
    if($signed_request->page->liked) {?>
     Page Liked - Display HTML
       <?php } else { ?>
     Dont Like Page - display html
    <?php }
    }
    ?>
    

    Now from here you can create any page to display what ever content you pretty much wish.

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

Sidebar

Related Questions

A client wants me to do some maintenance work to a VB 6.0 application
I'm opening a popup window via javascript. I'm trying to set some of the
I'm working on a website were a client wants to display a random testimonials
A client wants a merch shop on their site, and has set one up.
The client wants the checkout process to look like discrete pages for each step
I have a client that wants a WYSIWYG form that behaves like MS word.
I have a client who wants to display live 24 hour footage on their
I have a very annoying challenge in my app. The client wants to display
I'm building an employee bios page where the client wants selected thumbnails to display
Client wants to edit DotNetNuke skin and he is not a programmer, so I'm

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.