Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by onuraydinay · Jan 20, 2016 at 03:09 PM · wwwstartcoroutine

Cannot Get Facebook Profile Picture Using www in Unity Facebook SDK

I'm trying to get profile picture from graph.facebook.com using Facebook SDK for Unity 7.3.0. My Unity version is 5.3.

This is my function,

 public static IEnumerator GetFBProfilePicture (){
     WWW url = new WWW (System.Uri.EscapeUriString("https://graph.facebook.com/" + someUserID + "/picture?type=large"));
     yield return url;
     Debug.Log("Completed.");
     Texture2D texture = new Texture2D (180, 180, TextureFormat.DXT1, false);
     url.LoadImageIntoTexture (texture);
     // ...
 }

and I call this function like

 StartCoroutine (GetFBProfilePicture ());

It works fine in Unity Player and also in Android devices. But in iOS devices, "Completed." line doesn't show up. And there is no error log. It just keep waiting in the url line.

I tried it with iOS 7 and 9 with wireless connection and mobile data. Problem still occurs.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sdpgames · Feb 01, 2016 at 09:09 AM 0
Share

We have finally fixed this, essentially we purchased the Best Http Pro plugin (and disabled all the other features at compile time so we don't increase the executable size too much), now everything works a charm. $$anonymous$$y bet is that the www class has some SSL or security issue with Facebook, probably to do with this

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by sdpgames · Jan 21, 2016 at 12:09 PM

+1 Same here, we've tried with waiting for isDone and implemented a timeout mechanism, now it times out every time but we're never getting any image. Unity is 5.3.1p3. Does the same on iOS 8, 9, 3G and Wifi equally. Same with https requests too.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Dudicus · Jan 21, 2016 at 01:19 PM

I don't use Facebook programming but maybe it's because the variable is "WWW url" and your returning and loading "url"?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sdpgames · Jan 21, 2016 at 02:11 PM 0
Share

The LoadImageInfoTexture method is provided by the WWW class itself, somehow abstracting the types of result we can get from a WWW. Anyway in our case (code almost identical to onuraydinay's), it works on all platforms (Editor, PC standalone, $$anonymous$$acOSX); except on iOS + IL2CPP

avatar image
0

Answer by yathishgk · Jan 27, 2016 at 12:17 PM

Experiencing the same issue even in Unity 5.3.3f1, The WWW class request for the link http://graph.facebook.com/fb_id/picture?height=160 never gives response. The same has been conveyed to FB and we received the response that they have not changed anything. Was working fine 5.3.1f1. Works fine for Android and Editor even in Unity 5.3.3f1.But in iOS Unity 5.3.3f1 no response.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by AmrmHady · Nov 12, 2017 at 02:29 PM

have u tried putting the access_token? u have to put it if u use www url. just try. "......./?access_token="+AccessToken.CurrentAccessToken

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

41 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

wait WWW to finish download with yield does not work 0 Answers

WebGL/WebSocket has stopped while processing WWW.LoadFromCacheOrDownload 0 Answers

Loading array of objects by using parent folder name in asset bundle? 0 Answers

Streaming video as MovieTexture 2 Answers

Writing Files to Android Device 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges