按下facebook按鈕後,用戶登錄,然後webview立即轉到facebook移動站點。我需要的是該webview消失,因此我可以繼續與我的應用進行交互,而不是與facebook移動網站進行交互。如何在登錄後刪除facebookWebView? Flash Builder 4.6 ios開發
我很抱歉,如果我不清楚,上午5點和我,在這裏有點瘋狂大聲笑。看看代碼...
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
backgroundColor="#2F28C1" title="Setup"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import com.facebook.graph.FacebookMobile;
import mx.events.FlexEvent;
import views.setup_first.facebook;
import views.setup_first.flickr;
import views.setup_first.google;
import views.setup_first.tumblr;
import views.setup_first.twitter;
public var permissions:Array = ["user_birthday", "read_stream", "publish_stream"];
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
FacebookMobile.init("262320357178421", loginHandler);
}
protected function loginHandler(success:Object,fail:Object):void
{
}
protected function login():void
{
var facebookWebView:StageWebView = new StageWebView();
facebookWebView.viewPort = new Rectangle (0,0, stage.width, stage.height);
FacebookMobile.login(loginHandler, this.stage, permissions, facebookWebView);
trace("I'm logged in!");
}
protected function logout():void
{
FacebookMobile.logout(onLogout, "https://m.facebook.com/dialog/permissions.request?app_id=262320357178421&display=touch&next=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&type=user_agent&perms=publish_stream&fbconnect=1");
}
protected function onLogout(result:Object):void
{
trace("Perfect Log Out!")
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:navigationContent/>
<s:Button left="62" top="86" click="navigator.pushView(views.setup_first.google)"
icon="@Embed('../Setup/Setup_0002_Layer-5.png')"/>
<s:Button right="64" top="86" click="login()" icon="@Embed('../Setup/Setup_0001_Layer-6.png')"/>
<s:Button click="navigator.pushView(views.setup_first.tumblr)" horizontalCenter="-4"
icon="@Embed('../Setup/Setup_0000_Layer-7.png')" verticalCenter="-14"/>
<s:Button left="62" bottom="117" click="navigator.pushView(views.setup_first.flickr)"
icon="@Embed('../Setup/Setup_0004_Setup.png')"/>
<s:Button right="63" bottom="117" click="navigator.pushView(views.setup_first.twitter)"
icon="@Embed('../Setup/Setup_0005_Layer-1.png')"/>
<s:Button right="54" bottom="10" label="Skip" click="navigator.pushView(thirdPage)"/>
<s:Button id="logOut" x="323" y="210" height="28" label="LogOut" fontSize="15"
click="logout()"/>