如果用户在请求上点击“接受”,他们会看到一个iframe与我的网站。获取Facebook的iframe params
Facebook的URL(其具有的IFRAME),看起来是这样的:
https://apps.facebook.com/[request_id]/?fb_source=notification & request_ids = [request_ids] & REF = notif & app_request_type = user_to_user & notif_t = app_request
如何从iframe网址获取'request_id'?
在JS库中是否有方法/ API?
不幸的是,这并没有奏效(木薯cript部分)。它获取我的网站的URL,而不是iFrame的URL。有任何想法吗? – Vivendi 2012-04-25 09:02:11
不是其src attr中存在的iframe的url?更新我的回答 – Dhiraj 2012-04-25 09:17:50
你好Dhiraj。 src不在iframe中。我看起来像这样:'iframe class =“smart_sizing_iframe”frameborder =“0”scrolling =“yes”id =“iframe_canvas”name =“iframe_canvas_fb_https”src ='javascript:“”'height =“800”webkitallowfullscreen =“” mozallowfullscreen =“”oallowfullscreen =“”msallowfullscreen =“”allowfullscreen =“”style =“height:389px;”>'$ _GET ['request_ids']'不再可能。有趣的是,如果有JS解决方法。有任何想法吗? – FooBar 2014-03-24 15:29:19