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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:26:15+00:00 2026-05-15T23:26:15+00:00

on my site right now I’m trying to have it post to a users

  • 0

on my site right now I’m trying to have it post to a users wall a media file.
I had it working on the old api before, but now I’m trying to get it working on the new one and I’m having an issue.

I’m running this

$facebook->api_client->stream_publish($message, $attachment, $action_links);

Is that the old api or the new one? Because I’m getting this error

Call to a member function stream_publish() on a non-object in

I was reading a tutorial and it said to do this

$statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> 'the message', 'cb' => ''));

but how can I post an attachment/ action links using that?

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-15T23:26:16+00:00Added an answer on May 15, 2026 at 11:26 pm

    First of all, don’t confuse APIs with SDKs. The newest PHP SDK is capable of communicating with both the new Graph API and the old REST API.

    And you are using the new SDK, since Facebook::$api_client doesn’t exist in the new SDK.

    Secondly, as is usual with most tutorials, they only show you a snapshot of the full features of a system. See here for more details about publishing with the Graph API.

    However, you can still use the old API to publish your message like so

    $facebook->api( array(
        'method'       => 'stream.publish'
      , 'target_id'    => $facebook->getUser()
      , 'message'      => $message
      , 'attachment'   => $attachment
      , 'action_links' => $action_links
    ) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now we have AD/Exchange to manage all of our users logins/e-mail on-site at
Users on my site can post news items. But right now, it's all honor
I have mod_rewrite working on most of my site. Right now I have a
I am working on developing a drupal site right now. I have created a
Right now I have two different groups of users on my site: customers and
I am working on a site right now and have discovered that the jquery/javascript
So I have jFeed working on another site and i'm testing it right now
I have a membership site in beta right now... At the moment, when a
Right now I have a Drupal site where I'm integrating a custom front-end interface
Here is the thing. Right now I have this e-commerce web site where people

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.