IFRAME website HELP !

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 (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" "">
<html xmlns="">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">





Imports System.Configuration.ConfigurationManager

Imports Facebook
Imports Facebook.Web
Imports Facebook.Rest
Imports Facebook.Session
Imports Facebook.Schema
Imports System.Collections.Generic

Partial Public Class _Default
    Inherits CanvasIFrameBasePage

    Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        MyBase.RequireLogin = True
    End Sub

    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())


        End If

    End Sub

End Class



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.




Apr 29, 2010 at 1:44 PM
did you configure all url in application ?
Apr 29, 2010 at 2:00 PM

everything bar the url's in the profile tab

Apr 29, 2010 at 5:27 PM
Edited Apr 29, 2010 at 5:30 PM
Set the base url = localhost in the facebook connect settings on facebooks site.
Apr 29, 2010 at 9:14 PM

Facebook changed the way you authorize apps.  In your facebook application settings, you need to go to migrations and disable the new data permissions or download the latest out of source code where i have a fix for new data permissions that we are testing with right now.

Apr 30, 2010 at 9:13 AM

i also face the same issue.but now solved

configure all the connect url's in your facebook application as importpage.aspx/