Can not access Facebook friends via Android application

一曲冷凌霜 提交于 2019-12-05 06:25:55

I think i might've found the issue.. According to the documentation on onComplet;

     /**
     * Called when a request completes with the given response.
     * 
     * Executed by a background thread: do not update the UI in this method.
     */

And you are trying to update your UI, so addViews don't actually get reflected on the UI thread.. You should create a method in your activity that you can call from onComplete with runOnUIThread.. Something like this;

runOnUiThread(new Runnable() {
            public void run() {
                inserFacebookNames(facebookContactNames);
            }
        });

Let me know if this actually fixes it.. I'm curious if that was the reason..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!