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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:55:35+00:00 2026-06-12T00:55:35+00:00

I am posting custom action with facebook open graph api and I am successfully

  • 0

I am posting custom action with facebook open graph api and I am successfully posted that on my timeline with facebook c# sdk.

Here is my action code

curl -F 'access_token=AccessToken' \
     -F 'job=http://samples.ogp.me/476622222351784' \
        'https://graph.facebook.com/me/sajidap:apply'

Here is my object code

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# sajidap: http://ogp.me/ns/fb/sajidap#">
  <meta property="fb:app_id" content="APPID" /> 
  <meta property="og:type"   content="sajidap:job" /> 
  <meta property="og:url"    content="Put your own URL to the object here" /> 
  <meta property="og:title"  content="Sample Job" /> 
  <meta property="og:image"  content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" /> 

I am posting in this way.

 var fb = new FacebookClient(AccessToken);
 var parameters = new Dictionary<string, object>
            {
              { "og:type", "sajidap:job"},
              { "og:url" , "http://www.google.com"},
              { "og:image", "http://www.theappdynamics.com/images/babafooka.jpg" },
              { "og:title" , "Arslan Job"},
              { "job" , "http://samples.ogp.me/476622222351784"}
            };

var Response = fb.post(me/NameSpace:ActionName,Parameters);

Its posting an activity on my timeline but its showing Sample activity of an object that is like this url http://samples.ogp.me/476622222351784

How I can give my own url, image and title of that object by passing with parameter dynamically from C#.
Please guide me on this thing

  • 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-12T00:55:36+00:00Added an answer on June 12, 2026 at 12:55 am

    Its Simple i have done this. You have one page like that which have your Open graphs tags in it like this. Mean It should be some content page on your web.

    Let me clear more.. Like I have one resturant and I am selling some chicken burgers and I want to make one action "Buy" Mean In facebook it should be like this Arslan buy chicken lawa on link.

    1. In This Arslan is user who performed the action
    2. And Action is buy
    3. And Object was chicken lawa
    4. And URL is my below page who have all open graph tags in it to show in feeds.

    Here is ASPX Page

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# myapp: http://ogp.me/ns/fb/myapp#"> // Your app name will be replaced with this "myapp"
      <title>Buy Falafeel</title>
      <meta property="fb:app_id" content="4735" />  // Your APP ID
      <meta property="og:type"   content="myapp:falafeel" /> // YourAppName:Action Type 
      <meta property="og:url"    content="http://demo.anything.net/buy.aspx" /> 
      <meta property="og:title"  content="Chicken Lawa Falafeel" /> 
      <meta property="og:image"  content="http://www.theappdynamics.com/images/babafooka.jpg" /> 
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
         This is Falafeel Page. Demo Demo......
        </div>
        </form>
    </body>
    </html>
    

    Here I am Performing The action on button click from my code behind.

    void PostAction(string URL, string Token, string Action, string objects)
        {
            var fb = new FacebookClient(Token);
    
            var parameters = new Dictionary<string, object>
                {
                  { objects ,  URL}
                };
    
            try
            {
                dynamic result = fb.Post("me/myapp:" + Action, parameters); // again here should be your app name instead of "myapp"
            }
            catch { }
        }
    
     PostAction("URL", "AccessToken", "Action", "Object"); // Here is The Above Method Call
    // Here is URL That URL Who Have Open Graph Tags Like we have created one page with tags named buy.aspx and it should be full link like "http://xyz.com/buy.aspx"
    //Access Token Of User On Behalf we are going to create This Action
    //Action The One Created On facebook App Setting Of OpenGraph Tag Like "Buy"
    //Object That We Also Created On Facebook App Setting For OpenGraph Like "ChickeLawa"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully posted my custom shopping cart to PayPal -- it processes the
I have tried solving this problem by posting other related questions here that focused
I use the Facebook API for iOS, which enables posting content to the Facebook
Simple Wordpress problem - get_post_meta is not retrieving custom field values. Here's the code
I have started dabbling with Facebook Graph api fairly recently. I have defined a
I'm searching for the Custom Control, that would provide ViewController for posting the status
I'm building a custom CMS for my clients and i've implemented the Facebook API
when i test my code using the Facebook SDK for iOS, all my post
Posting this one for a friend. They have an Icefaces app that uses Icefaces's
My JQuery code is posting, because the success function is firing. The problem 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.