I can't load images from Graph Facebook

后端 未结 4 2065
鱼传尺愫
鱼传尺愫 2021-02-10 03:41

url: https://graph.facebook.com/100779423975829/picture?type=large;

other url with type normal: https://graph.facebook.com/100779423975829/picture?type=normal


相关标签:
4条回答
  • 2021-02-10 04:15

    I have the same issue. If you don't want to use the graph api for loading the public profile picture (as in my case) we both have a problem unless someone knows the solution.

    0 讨论(0)
  • 2021-02-10 04:23

    I have the same problem. It seems to be a bug. I think we are best of just waiting a day or two instead of putting the effort in fixing this ourselves. See also : Facebook graph user picture won't show on mobile devices and https://developers.facebook.com/bugs/560392384345729/

    0 讨论(0)
  • 2021-02-10 04:30

    Yes, the redirections from http:// to https:// protocols hinders the downloading using Picasso,Glide ets. You may go ahead with following two approaches:

    1. SimpleDraweeView from Facebook Sdk. It handles the redirection internally.

    2. Make a graph request to fetch the re-directed url like below and use that url in picasso.

      new GraphRequest(AccessToken.getCurrentAccessToken(), "/"+fbUserId+"/picture?width="+width+"&height="+height+"&redirect=false", null, HttpMethod.GET, new GraphRequest.Callback() { public void onCompleted(GraphResponse response) {

                          try {
                              String url = response.getJSONObject().getJSONObject("data").getString("url");
                              loadFacebookProfilePicInImageView(url);
                          } catch (Exception e) {
                              e.printStackTrace();
                          }
      
                      }
                  }
          ).executeAsync();
      
    0 讨论(0)
  • 2021-02-10 04:41

    Finally this was a facebook bug. So the problem is fixed by themselves.

    https://developers.facebook.com/bugs/261587761048160/

    0 讨论(0)
提交回复
热议问题