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 7968393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:04:11+00:00 2026-06-04T07:04:11+00:00

i am having problem with publish dialog via javascript SDK. It sometimes work, sometimes

  • 0

i am having problem with publish dialog via javascript SDK. It sometimes work, sometimes dont.

It throws this error:

API Error Code: 102 API Error Description: Session key invalid or no
longer valid Error Message: Iframe dialogs must be called with a session key

My code:

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

      // wait a moment before showing dialog.
      setTimeout("showbox()", 2 * 1000);
    };

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

and

    <script>
     function showbox()
     {                          
          FB.ui(
          {
            display: 'iframe',
            method: 'feed',
            name: 'ASD ASD ASD:',
            link: 'https://apps.facebook.com/XXX/',
            picture: 'https://skvelazabava.eu/XXX/yy.jpg',
            caption: 'Největší alkoholici mezi tvými přáteli jsou:',
            description: ' ',
            properties: [{text:"XXX", href:"https://apps.facebook.com/XXX/"}, 
                         {text:"YYY", href:"https://apps.facebook.com/XXX/"} ], 
            redirect_uri: 'https://url.eu/'
          });
     }                    
    </script>

What do i have to do to make sure dialog will have session key.

  • 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-06-04T07:04:11+00:00Added an answer on June 4, 2026 at 7:04 am

    This was also the case for me, to clarify for anyone else who encounters this:

    <script>
      window.fbAsyncInit = function() {
        FB.init({
            appId  : '{{facebook_app_id}}',
            app_token : '<%=@access_token%>',
            status     : true,
          });
    
        FB.getLoginStatus(function(response) {
          console.log(response);
    
          FB.ui({
            method: 'apprequests',
            message: 'Have you heard about Rell?',
            data: 'invite-to-rell-42',
            display: 'iframe',
            filters: [{name: 'Daaku', user_ids: ['1677846385']}, 'app_non_users', {name: 'Games People', user_ids: [703, 6203644]}]
          });  
    
        });
    
    
      };
    
      // 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>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having this problem An error occurred while trying to make a request
I'm having problem selecting an element with an id like this <li =0f:Bactidol_Recorder.mp4>. I
I am having problem getting my tooltip to work when using the jQuery load()
This is the problem that I am having 1.If the receiver is started first
I'm having a weird problem with fb sdk for iphone. It was working all
I'm having problem with FS controller page template. I had this Plone2 base product
i having problems using this code in order to include a photo in my
I'm using FBConnect sdk in order to publish posts to a user's profile via
I am having problem in updating status on facebook. I am using Facebook sdk,
I'm having problems publishing my MVC project. When I do publish and upload everything

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.