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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:30:43+00:00 2026-06-09T17:30:43+00:00

I have written an application that is able to write posts from the command

  • 0

I have written an application that is able to write posts from the command line, to a particular users account. This, with the required permissions, is successfully posting messages with location and places information.

My next step was to upload images to a user account, but the problem is, I’m getting the following error:

A user access token is required to request this resource.

Now the script that does the API post, does not run from a browser, but rather as a Linux service daemon implemented with PHP. This script contains a game loop, that posts messages, and uploads photos to participants accounts at certain times throughout the day, simulating a holiday their profiles are attending.

So when calling BaseFacebook::getUser from my application script, I get a result of 0, which means, that BaseFacebook::getAccessToken will return an application access token, rather than a user access token.

I checked also, and noticed that the protected method BaseFacebook::getUserAccessToken doesn’t return a valid token, since the command line app has no session, and it has to post to separate different user accounts in succession, during the game loop.

As I mentioned, I am able to make posts, and even attach places to my posts, but is there a way to upload photos to different user accounts without requiring a user access token?

I understand that I can use offline_access, but this is being deprecated on 3 October 2012, which is the time when our clients application will already be running live.

The players/users of our app do however visit the application from time to time, so would it be possible to use a token from the browser, store it in our database, and just utilize that from the command line applciation?

  • 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-09T17:30:45+00:00Added an answer on June 9, 2026 at 5:30 pm

    The players/users of our app do however visit the application from time to time, so would it be possible to use a token from the browser, store it in our database, and just utilize that from the command line application?

    That’s exactly the way to go.

    And this document describes how to handle these token, how to get long-lived ones, etc. – https://developers.facebook.com/roadmap/offline-access-removal/

    And https://developers.facebook.com/blog/post/2011/05/13/how-to–handle-expired-access-tokens/ is also something that one should have read.

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

Sidebar

Related Questions

All, I have written a PhoneBook application in Java that is command line based.
I have written a console application in Delphi that queries information from several locations.
I have inherited a 20-year-old interactive command-line unix application that is no longer supported
I have written an application that keeps erasing my shared preference. It was always
I have written a PHP application that uses Objects heavily. Added, deleting, updating etc..
I have written a little console application that uses s#arp. I can create an
I have written a Scala (2.9.1-1) application that needs to process several million rows
I have C# application that makes use of some C libaries(which I have written
I have written an application for Android. the main part being that it communicates
I have written a WinForms application (C# 2.0, VS2008) that registers several file types

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.