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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:46:26+00:00 2026-05-30T05:46:26+00:00

Using graph api publish_stream permission: together with offline_access permission: As described here and here

  • 0

Using graph api publish_stream permission: together with offline_access permission:

As described here and here. However for some reason one of the following two things are happening:

I am trying to post to a facebook user which is not currently logged in, following an action of a user which is curently logged in (e.g. telling user #1 that user #2 visited their farm in farmville, but user #1 is not logged in, while user #2 is. And they are not necessarily friends).

When I tried this using the following code, the post was not created when users #1 and #2 were not friends (first problem), and when they were friends, the post was being created, but seemed like user #2 was posting it on user #1’s wall (second problem – this is NOT what I am trying to do, I want it to be anonymous).
See the first code I used:

    $post_id = $facebook->api('/' . $user1_id . '/feed/', 'post', array(
    'message' => 'Someone just visited your farm',
    'link' => 'http://example.com',
    'picture'  => 'http://example.com/img/picture.jpg',
    'caption' => 'Visit farms!'
    ));

So I tried to use the access token of user #1, which he gave me when he was logged in, and the application is supposed to be able to post on their wall even when they are offline (even without offline_access permission – see here facebook’s documentation: “you can publish… without requiring offline_access”. At any rate, when I am adding the access_token to the array as a parameter (see the code below), no post is being created at all:

    $post_id = $facebook->api('/' . $user1_id . '/feed/', 'post', array(
            'access_token' => $user1_access_token,
    'message' => 'Someone just visited your farm',
    'link' => 'http://example.com',
    'picture'  => 'http://example.com/img/picture.jpg',
    'caption' => 'Visit farms!'
    ));

What should I do?

gain, I am simply trying to publish to user’s wall that is NOT logged in, but who gave me the publish_stream permission, a post from the application, not any other user, telling this user that someone (anonymously) has “visited their farm” (or created some action associated with them).

Thanks everyone.

  • 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-30T05:46:27+00:00Added an answer on May 30, 2026 at 5:46 am

    this is just a recommend & i’m not sure this be the answer
    Destroy all of the sessions (or use your browser in private mode -for Firefox )
    & then visit sender page Like this

    example.com/postfarm.php

    maybe when you visit the page normally the app gets your access_token & tries to post as you

    PS:better way

    use this code & you dont need to destroy sessions anymore

        include_once ('src/facebook.php');/// include sdk
        ////// config The sdk
            @ $facebook = new Facebook(array(
            'appId'  => 'XXXXXXX',
            'secret' => 'XXXXXXXXXXXXXX',
             ));
    $facebook->destroySession();
        try{        
        $post=$facebook->api('USER_ID/feed/','POST',array(
        'message' => '$message',
        'link'=>'http://apps.facebook.com/xxxxxxx/link.php?link=',
        'picture'=> 'XXXXXXXXXX',
        'name'=>'XXXXXX',
        'description'=>'yes',
    
        ));
        }
        catch(FacebookApiException $e) {
        echo $e->getType();
        echo '<br />';
        echo $e->getMessage();
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using graph api from youtube , and i am facing some trouble .
I've been using the Graph API for a while. One feature of my application
Using the Facebook Graph API and the PHP SDK, I know that I can
I started developing a Facebook app using the new Graph API. I want to
Is there any limitation to post to the Facebook wall using Graph API? Because
I am trying to get user album by using GRAPH API with function facebook.request(contact.getFacebook_id()+/albums)
I'm using the Graph API Explorer to help debug my app. All I'm doing
I'm using the graph api. I have a logged in user, and want to
I am receiving the following graph response when checking users into Facebook using the
I am using graph API to get the feed post. https://graph.facebook.com/128172073865656/feed?limit=200 but it is

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.