我想用一个带有正则表达式的值添加一个(变量)标签,该模式适用于PHP,但我在将它实现到JavaScript时遇到了麻烦.
模式是(value是变量):
/(?!(?:[^<]+>|[^>]+<\/a>))\b(value)\b/is
Run Code Online (Sandbox Code Playgroud)
我逃脱了反斜杠:
var str = $("#div").html();
var regex = "/(?!(?:[^<]+>|[^>]+<\\/a>))\\b(" + value + ")\\b/is";
$("#div").html(str.replace(regex, "<a href='#" + value +">" + value + "</a>"));
Run Code Online (Sandbox Code Playgroud)
但这似乎不对,我记录了模式,它应该是它应该是什么.有任何想法吗?
我在 Facebook 页面上收到此错误。
App not active: This app is not currently accessible and the app developer is aware of the issue. you will be able to log in when the app is reactivated.
另外,我在 Laravel 中使用“Laravel Socialite”实现了 facebook 登录。
我正在尝试使用javascript sdk恢复我的facebook新闻Feed中的上周帖子.我能够获得第一页,但后来,我不知道如何继续迭代其他页面.我用以下代码尝试过:
 $('#loadPosts').bind('click', function() {     
            FB.api('/me/home',{since:'last week'}, getPosts);   
          });
 getPosts = function(response){
        for (element in response.data){
            post = response.data[element]
            console.log(post);          
          }
          previousPage = response.paging.previous;        
          console.log(previousPage);
          // can i call FB.api(previousPage, getPosts); ??      
      }
Run Code Online (Sandbox Code Playgroud)
但我得到一个URL作为上一页,我不知道如何从该URL进行javascript FB.api调用.有任何想法吗?
这看起来像一个重复的问题但实际上并非如此.
所以问题是https://www.facebook.com/julytalk/肯定有事件.但是当我尝试使用Facebook Group API工具包时,它返回空数组.
为什么会这样?我根本找不到任何Facebook API端点修改通知.以前工作还可以.
请帮我.
使用有效的Facebook App调用FB.getLoginStatus时,响应状态始终未知.确切的回答是{authResponse:undefined,status:"unknown"}.
<html>
<body>
    <div id="fb-root"></div>
    <script>
    window.fbAsyncInit = function(){
        FB.init({ appId:'1484134468466778', status:true,  cookie:true, xfbml:true});
        FB.getLoginStatus(function(response){
        console.log(response);
        });
    };
    (function(d){
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
    </script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
示例网址:http: //media.tuentifotos.com/simple_test.html
这是Facebook App Settings的屏幕截图.

如何公开我的Facebook应用程序?
我能够通过重定向访问我的应用程序但是当我使用其他人的凭据访问它时,它显示此应用程序处于开发模式,您无法访问.
如何将其更改为公共模式?
我设置了一个Facebook登录,和我成功地把事情一样first_name,email等等.但是,我似乎无法弄清楚如何获得的生日.如果我打电话给birthday下面,没有任何回报.
FB.api('/me', {fields: 'birthday'}, function(response) {
  console.log(JSON.stringify(response));
})
Run Code Online (Sandbox Code Playgroud)
如果我打电话user_birthday如下,我收到此错误:"error":{"message":"(#100) Tried accessing nonexisting field (user_birthday)
FB.api('/me', {fields: 'user_birthday'}, function(response) {
  console.log(JSON.stringify(response));
})
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?
我知道ajax和返回变量的问题,我在stackoverflow中读到这个,我知道我必须使用回调函数,但在我的情况下没有工作,当然我做错了
我的代码是这样的:
var id_user=get_id_user_login();//undefined??????????
function get_id_user_login(){
    FB.api(                                                
         '/me',                     
          {fields:'id'},
          function(response){//callback       
                 console.log(response.id);//OK
                 return response.id;
           }
     );             
};
Run Code Online (Sandbox Code Playgroud) Facebook Messenger Lite 用户看不到画廊,也看不到 FB Messenger 的许多其他更丰富的方面。
我应该如何识别通过 Facebook Messenger Lite(与 FBM Full)发送的用户消息,以便我可以有效地为他们提供服务,而不会降低为 FB Messenger Full 用户提供的丰富性?
PS 有人需要创建标签“facebook-messenger-lite” - 我还没有它的声誉。
有人可以向我解释 facebook 的图形 API 和营销 API 之间的区别。
还有哪个应该用于哪些请求。
我一直在使用 facebook python SDK 创建广告。但我时不时地遇到速率限制。但在我的营销 API 仪表板中,我看不到任何数据。
任何信息将不胜感激