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

The Archive Base Latest Questions

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

My application gets approved and a user gets an access token and extended permissions

  • 0

My application gets approved and a user gets an access token and extended permissions which include offline_access and publish_stream.

I want to be able to post from inside my model. This would require me to make an
https://graph.facebook.com/FBUSER_ID/feed
plus some parameters and access token, app_id, app_secret.

   I have the access token and FBUSER_ID.

What I don’t know how to do is put it all together in the model.

Could anyone point me in the right direction?

I already have a facebook application. I need to know how to post from the server to a users wall

**Thanks to the answer below I was able to get it working with the following:

access_token = "AAACvmqy1nYoBAAZCkGXbVgRwcBv******ZAMjsLxKxR7DaZBE0NxY8ZBGBW1q2mzsB9TDT0RvgeQcDdnyFJNAYRf0icnhlbikZD"
    appID = '1776938807888574888888888882'
    message = 'test_message'
    userID = '75164088804088888'
    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 })
    sock = Net::HTTP.new(uri.host, 443)
    sock.use_ssl = true
    sock.start do |http|
      response = http.request(req)
    end

IMPORTANT: at the top of the controller or model add:

 require 'openssl'
  • 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:15:59+00:00Added an answer on May 27, 2026 at 10:15 am

    First you have to create a Facebook application here. By the app_id and app_secret of created application, you will ask user to give “publishing feed” permission to your application. While getting this permissions you get also the access token for posting the users wall.

    You can get detailed info about authentication here:
    https://developers.facebook.com/docs/authentication/

    And you can get info about publishing here on the Publishing section:
    http://developers.facebook.com/docs/reference/api/

    With ruby, your need is just making an HTTP Post. This may be an example for this:

    Net::HTTP.post_form(URI.parse('https://graph.facebook.com/FBUSER_ID/feed'),
                              {'access_token' => 'ACCESS_TOKEN', 'message' => 'MESSAGE'})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an application which uses MANY images. The application gets the images from
I'm developing an application that gets large images from an Internet server which is
I'm trying to debug an application which gets an InvalidCastException. The failing line is
I learning Perl and I want to create a simple application that gets all
I want to log some details when the Application gets force close itself. Ya,
My WPF application gets a file from the user with Microsoft.Win32.OpenFileDialog()... Private Sub ButtonUpload_Click(...)
My Java standalone application gets a URL (which points to a file) from the
My application gets data from a hardware device which is represented as a string,
I have a Java application which is used to start a Swing user interface.
My application gets configured via a lot of key/values (let's say 30.000 for instance)

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.