Swift facebook SDK取消分享对话框

时间:2015-04-19 10:52:11

标签: ios facebook sdk dialog share

当我点击取消或分享按钮时,对话框总是将我带到我的Facebook页面。当我点击取消或分享按钮时,有没有办法让它返回我的应用程序。非常感谢,抱歉我的英语不好。

这是我的Facebook Dialog图片 https://www.flickr.com/photos/125253862@N07/16990249387/

这是我的Facebook对话框,显示代码图片 https://www.flickr.com/photos/125253862@N07/16990247507/

这是我的代码

import UIKit
import Parse
import Bolts

class FacebookController: UIViewController {

let UserDef: NSUserDefaults = NSUserDefaults()

func FBsharelink() {

    var playerTime = UserDef.valueForKey("TimeOfPlayer") as! Int
    var playerScore = UserDef.valueForKey("PlayerScore") as! Int

    let content : FBSDKShareLinkContent = FBSDKShareLinkContent()
    content.contentURL = NSURL(string: "https://www.facebook.com/CityDefender")
    content.contentTitle = "I have \(playerScore) scores in \(playerTime) seconds. Come and beat me !"
    content.contentDescription = "City Defender News"

    FBSDKShareDialog.showFromViewController(self, withContent: content, delegate: nil)

}   
}

P / s:我不能在这里发布图片:(

0 个答案:

没有答案