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

  • Home
  • SEARCH
  • 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 6921225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:14:56+00:00 2026-05-27T10:14:56+00:00

In my app a user grants my application extended permission and I get the

  • 0

In my app a user grants my application extended permission and I get the access token and store it as its a long lived access token.

This user is shown a list of their friends and they select one.

I store their name and fbuid in my database.

Now on a day in the future I want to send a message to this friend’s wall.
Is this possible?
If not what other options are there to send a link to the friend in Facebook when the initial user is offline?

* Update
I was able to do this with the long lived access token and offline access as follows:

access_token = "AAACvmqy1nYoBAAZCk*************dZAMjsLxKxR7DaZBE0NxY8ZBGBW1q2mzsB9TDT0RvgeQcDdnyFJNAYRf0icnhlbikZD"
    appID        = '19307***********'
    message      = "Happy Birthday   from  your friends."
    name         = "Click here for your Birthday Surprise"
    redirect_uri = URI.parse('http://localhost:3000/facebook/')
    link         = "https://www.facebook.com/dialog/oauth?client_id=#{appID}&redirect_uri=#{redirect_uri}"
    caption      = "Your friends have created a surprise for you. Click the link to see what it is."
    picture      = 'http://www.birthdaywall.net/logo-mail.png'
    userID       = '100002*********'
    uri = URI.parse("https://graph.facebook.com/#{userID}/feed")
    req = Net::HTTP::Post.new(uri.path)
    result = req.set_form_data({:access_token => access_token , :message => message, :app_id => appID, :name => name, :link => link, :caption => caption, :picture => picture,  })
    sock = Net::HTTP.new(uri.host, 443)
    sock.use_ssl = true
    sock.start do |http|
      response = http.request(req)
    end 

I don’t know if this is the best way but it works for me so I am using it. If anyone has a better way I would be very happy to know about it.

  • 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-27T10:14:57+00:00Added an answer on May 27, 2026 at 10:14 am

    I guess you have the publish_stream permission already. You also need the offline_access extended permission to make your access token live long:

    Enables your app to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when they are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived.

    See here: https://developers.facebook.com/docs/reference/api/permissions/

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

Sidebar

Related Questions

Currently I have this code var App = Ember.Application.create(); App.user = Ember.Object.create({ people: customers
I am trying to get the application access token to use it in my
As mentioned in this other question , if a user grants the publish_stream permission,
I have a facebook app for which user grant me permission to access user_subscriptions
I need to build app with user messages (dialogs). I've solved this problem by
So im making this app where user could add UP to 3 images to
I building a console app that runs under a normal user account to access
When a user accepts my application request, the user is redirected to my app
In my app,user can select image from gallery and after that he can zoom
I've created a simply web radio streaming app, and on of my app user

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.