ASP.Net and FaceBook Wall integration
Posted
by Jit
on Stack Overflow
See other posts from Stack Overflow
or by Jit
Published on 2010-03-26T18:55:09Z
Indexed on
2010/03/26
19:23 UTC
Read the original article
Hit count: 563
facebook-api
|ASP.NET
Hi, I am new to FaceBook API. I like to send messages when I want from my aspx webpage. I used the different examples and used FaceBook API 3.1. I am getting error as "service temporarily unavailable". I have assigned AppKey, Secret Key and session key. My sample code is below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Facebook;
using Facebook.Web;
using Facebook.Rest;
using Facebook.Session;
using Facebook.Utility;
using Facebook.BindingHelper;
using Facebook.Schema;
using Facebook.Web.FbmlControls;
using Facebook.Session.DesktopPopup;
namespace FaceBookApp
{
public partial class _Default : System.Web.UI.Page
{
private const string ApplicationKey = "MY_APP_KEY";
private const string SecretKey = "MY_SECRET_KEY";
private Api fbAPI;
private ConnectSession _connectSession;
// private List<EventUser> _eventUsers;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
_connectSession = new ConnectSession(ApplicationKey, SecretKey);
_connectSession.SessionKey = "MY_SESSION_KEY";
if (!_connectSession.IsConnected())
{
// Not authenticated, proceed as usual.
//lblStatus.Text = "Please sign-in with Facebook.";
}
else
{
// Authenticated, create API instance
fbAPI = new Api(_connectSession);
string response = fbAPI.Stream.Publish("publish steven on facebook.");
}
}
}
}
The error message is confusing. It must be a very simple solution. I don't know what I am missing. Pls help. Here is the facebook exception. {"Service temporarily unavailable"}
© Stack Overflow or respective owner