views:

451

answers:

1

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"}

A: 

The error message seems to suggest that the problem is Facebook's API not being able to keep up--with the kind of growth they are seeing, this is no surprise, and has happened before. If that's really it, it'll probably work when you try it again after a few hours.

ewall
I have also thought on this line. But it is happening since 2 days. Can you tell me if there is any mistake in my program? It is a very simple app. I am thinking I may be missing something.
Jit
I haven't used the FB APIs with ASP.NET (I have done a little bit with other interfaces, though), but I can dig a little more to see if anything in the code stands out.
ewall
Sadly, I think I'm too green on the ASP.NET side, so I'm not finding much of use. I assume you have already looked through the tutorial at http://fbtutorial.qsh.eu/ ?
ewall