Apr 29, 2010 at 10:46 AM
Edited Apr 29, 2010 at 10:48 AM
please help me i think im going nuts. been trying this for 3 days now.
what i have is a bog standard asp.net (vb) website that i designed to run inside the iframe of facebook.
i have been looking at all the examples, facebook api documentation etc...
i have come to the following point. to test that my code works i created a basic 1 page site that i was hoping would ask the user to 'allow access' to my application if it was their first time using it or if they have already granted it access it would simply
display their user name. not to complicated... at least thats what i thought 4 days and 5 packs of smokes ago.
here is what i have so far:
<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="Default.aspx.vb" Inherits="FB_TESTER._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form1" runat="server">
Partial Public Class _Default
Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
MyBase.RequireLogin = True
Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim ObjFBIframe_Session As New IFrameCanvasSession(ConfigurationManager.AppSettings("ApiKey"), False)
Dim ObjFBAPI As New Api(ObjFBIframe_Session)
Dim loggedInUser As user = ObjFBAPI.Users.GetStandardInfo(ObjFBAPI.Users.GetLoggedInUser())
everytime i call this i get the this:
API Error Code: 100
API Error Description: Invalid parameter
Error Message: Requires valid next URL.
and i get this inside the facebook page trying to use my app.
from what i have read this is something to do with the extended permissions, now i know you can alter the migration settings on the facebook app to deal with this but that fix wont last much longer.
also if you have read my code and dont understand what i am trying to achieve it is this.
on the first page of my iframe website i need it to ask for 'allow permissions' if required and if not redirect to another page of my i frame website and when i need more data from facebook i intend to recover the session.
if im going in the wrong direction please tell me as i feel like im going round in circles with a map of crappy documentation that is telling me to do so.
PLEASE HELP ME