Invalid API Key

Aug 29, 2007 at 3:42 PM
Has anyone got an invalid API Key when they tried to use setFBML?
Aug 31, 2007 at 4:08 PM
your getting the invalid api key error because are not using the proper api key for your application. Go to your applicaiton on and find the proper key for your application or create an application if you haven't already.
Sep 12, 2007 at 4:55 PM
Edited Sep 17, 2007 at 7:37 PM
I have the exact same problem. And my key is setup correctly. It was working before and then it just stops. This happened because I added the app, remove it and then try to go to the url and it gives this error.
If I go to the app page where I can add it then it works fine!!!


Here is my code
Partial Public Class _Default
Inherits CanvasIFrameBasePage
Private _fbService As Facebook.Components.FacebookService = New Facebook.Components.FacebookService()

Shadows Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
_fbService.ApplicationKey = "myKey"
_fbService.Secret = "mySecret"
_fbService.IsDesktopApplication = False

Dim sessionKey As String = TryCast(Session("Facebooksessionkey"), String)
Dim userId As String = TryCast(Session("Facebook_userId"), String)

' When the user uses the Facebook login page, the redirect back here will will have the auth_token in the query params
Dim authToken As String = Request.QueryString("auth_token")

' We have already established a session on behalf of this user
If (Not String.IsNullOrEmpty(sessionKey)) Then
_fbService.SessionKey = sessionKey
_fbService.UserId = userId
' This will be executed when Facebook login redirects to our page
ElseIf (Not String.IsNullOrEmpty(authToken)) Then
Session("Facebooksessionkey") = _fbService.SessionKey
Session("Facebook_userId") = _fbService.UserId
Session("Facebooksessionexpires") = _fbService.SessionExpires
' Need to login
Response.Redirect("" & _fbService.ApplicationKey & "&v=1.0")
End If

If (Not IsPostBack) Then
' Use the FacebookService Component to populate Friends
lblUserID.Text = "It is kinda of wokr"
_fbService.SetFBML("<fb:subtitle><fb:action href='' >More Events</fb:action></fb:subtitle>")

End If

End Sub