Kerry Lindsay
Kerry Lindsay

Reputation: 1

Get Access Code without an App ID

I need to post to my client's facebook wall from their C# application, they do not have a facebook application.

To do this I need to get an Access Token, and to do that I need an App ID. How can I get an Access Token without and App ID, or will I need to create a "dummy" facebook app to get an appid?

Thanks, Kerry

Upvotes: 0

Views: 294

Answers (2)

Jonathan Dean
Jonathan Dean

Reputation: 1112

Creating a Facebook application and Page Management access token is super quick and easy. All you need to do is the following:

  1. Go to the developer app at http://developers.facebook.com/apps/ and click "+ Create New App". This creates a new app for you. Name the app well as the app name may appear when posting to the page.
  2. You can then go to the Graph Explorer ( https://developers.facebook.com/tools/explorer ) select you new app from the "Application" drop down in the top right, then click "Get Access Token" button. Now click "Extended permissions" and then select "manage_pages", now click "Get Access Token". You now have an access token between you and the app.
  3. Now to get the page access token to allow you to manage your page (you need to be an admin of the page), just go to https://graph.facebook.com/me/accounts in the graph explorer. This gives you a list of access tokens for all of the pages and apps you are an admin of. You can then use this page access token to post as the page. Take the page access token of the page you want to post to and use that in your app when posting to the page.

If you need an access token which lasts more than 60 days you need to review the docs here https://developers.facebook.com/roadmap/offline-access-removal/ to get a long lived access token at step 2 above.

I hope that helps!

Upvotes: 1

Anant Dabhi
Anant Dabhi

Reputation: 11104

you can send using facebook social plugin

sample code

<div id="fb-root"></div>


<script>
    (function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
    </script>


<div class="fb-send" data-href="http://example.com"></div>

Upvotes: 0

Related Questions