Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by BraveVN · May 01, 2014 at 03:04 PM · facebookscreenshotshare

2 issues with Facebook Sharing in Window Phone

Hello folks, I use TakeScreenShot() function (it's in the InteractiveConsole example in FB SDK for Unity) to take a screenshot and post it to FB. But there are 2 problems appeared:

  • First: the screenshot that's captured is a gray blank like this: http://i7.minus.com/iXiHlCcSWaVfC.jpg

  • Second: No one can see my post except me although I set the photo to public.

How can I fix these problems ? Thank you.

Here is the code of TakeScreenShot() function

 private IEnumerator TakeScreenshot() {
        yield return new WaitForEndOfFrame();
  
        var width = Screen.width;
        var height = Screen.height;
        var tex = new Texture2D(width, height, TextureFormat.RGB24, false);
        // Read screen contents into the texture
        tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
        tex.Apply();
        byte[] screenshot = tex.EncodeToPNG();
  
        var wwwForm = new WWWForm();
        wwwForm.AddBinaryData("image", screenshot, "InteractiveConsole.png");
        wwwForm.AddField("message", "herp derp.  I did a thing!  Did I do this right?");
  
        FB.API("me/photos", Facebook.HttpMethod.POST, Callback, wwwForm);
        Debug.Log("done");
 }
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 BraveVN · May 02, 2014 at 09:07 AM 0
Share

help me, please

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by booba · May 21, 2014 at 02:40 PM

how do you call your function? you need to StartCoroutine() for the yield to work. (that's my best guess for why your screenshot is gray) about the private picture in fb - i noticed that when you do this from unity's editor the picture is published with "only me" privacy settings, but when you actually do it from a device (android here) it's fine. also if you were playing with your app maybe your account has a high privacy setting already saved for it although you changed it at some point. go to your settings -> apps and remove the app's record from your profile then try again.

Comment
Add comment · Show 2 · 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 BraveVN · May 23, 2014 at 02:39 PM 0
Share

Thanks for your help. I had used StartCoroutine() but it's not works. Besides that, I just realize latest FB SD$$anonymous$$ for Unity not support for Window Phone and FB SD$$anonymous$$ Plus (a fixed version from a fan of Unity that come from here: chillsters.com/facebook-sdk-for-unity-plus-windows-phone-8/) has many errors and cannot take the screenshot as well

avatar image booba · May 25, 2014 at 10:51 AM 0
Share

well then i'm guessing you're dropping the sdk? i'm currently experimenting with a native android plugin to open a share intent ins$$anonymous$$d of posting through the facebook sdk... can't say that it's easy to make work

avatar image
0

Answer by andrescavallin · Aug 07, 2014 at 05:28 AM

Dear Brave, the problem is not related to Chillsters SDK, actually is a Bug on some Windows Phones that will eventually get fixed. See here: http://fogbugz.unity3d.com/default.asp?615213_854qu441tj00hbqr The reason you are the only one seeing your posts is because you app is still being developed on Facebook, you need to get approved by Facebook (publish_actions) and then go live. By the way, you will never get approved by Facebook by harcoding messages on the post like "herp derp", you need to allow the user to edit what is being posted.

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

22 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

Related Questions

Share image with hastag 2 Answers

Facebook share screenshot with link. 1 Answer

facebook sdk share screen shot 0 Answers

Problem when take a screenshot and share to Facebook 1 Answer

Can't Post Screenshot To Facebook Wall 1 Answer


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