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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:07:40+00:00 2026-05-15T13:07:40+00:00

Yesterday I changed the application settings and enabled New Data Permissions and New SDKs.

  • 0

Yesterday I changed the application settings and enabled “New Data Permissions” and “New SDKs”.

After that the feature of posting message to the users wall stopped working. On my website, users login using facebook API (Graph) and are able to post messages on their wall.

This is my old code that was working fine:

function publish_with_permission(permission,action_links,attachment) {
  FB.ensureInit(function() {
    FB.Connect.requireSession(function(){
        //check is user already granted for this permission or not
        FB.Facebook.apiClient.users_hasAppPermission(permission,
        function(result) {
            // prompt offline permission
            if (result == 0) {
                // show the facebook permission dialog
                FB.Connect.showPermissionDialog(permission,
                function(result){
                    if (!result) {
                       FB.Connect.streamPublish('', attachment, action_links, null, "Post this:", jscallback);
                    } else {
                    // permission granted, post without facebook dialog
                       FB.Connect.forceSessionRefresh(function() {
                       FB.Connect.streamPublish('', attachment, action_links, null, "Post this:", jscallback,true);
                    });
                }
            }, true, null);
        } else {
            // permission already granted, post suddenly
            // without facebook dialog
            FB.Connect.streamPublish('', attachment, action_links, null, "Post this:", jscallback,true);
            }
        });
    });
});
}

The function just hangs and nothing happens. I searched on this forum and found this post

function fb_publish() {
     FB.ui(
       {
         method: 'stream.publish',
         message: 'Message here.',
         attachment: {
           name: 'Nom ici.',
           caption: 'Caption here.',
           description: (
             'description here'
           ),
           href: 'url here'
         },
         action_links: [
           { text: 'Code', href: 'action url here' }
         ],
         user_prompt_message: 'Personal message here'
       },
       function(response) {
         if (response && response.post_id) {
           alert('Post was published.');
         } else {
           alert('Post was not published.');
         }
       }
     );  
  }

This one works, but it has two problems
1) Even though when the user logs in first time using graph API and they have granted extended permissions to publish to their wall, this method will everytime ask the user whether to allow or not – The previous one did not do that.
2) This method also allows user to add their comments – I dont want this either.

I want to seamlessly publish to the wall without again explicitly asking for the permission as they have already granted it before.

I am using PHP – any tips will be appreciated
Thanks

  • 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-15T13:07:40+00:00Added an answer on May 15, 2026 at 1:07 pm

    I could not figure out a way to do it using Javascript – so I used php instead

    
    try 
    {
       $statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> 'example status message', 'cb' => ''));
    } 
    catch (FacebookApiException $e) 
    {
    
    }
    
    
    

    Hope it helps someone

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

Sidebar

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.