Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Twitter.Compose Showing the wrong picture #19

Open
AdandelaPena opened this issue Mar 20, 2018 · 1 comment
Open

Twitter.Compose Showing the wrong picture #19

AdandelaPena opened this issue Mar 20, 2018 · 1 comment

Comments

@AdandelaPena
Copy link

AdandelaPena commented Mar 20, 2018

I have an app that lets users take screenshots and then send them however the picture preview is showing the wrong picture after the first one.

  • Use twitter sample, add code to set button image color red after taking the screenshot example:
    `//reference to the image on the button
    public UnityEngine.UI.Image img;

    public void LoginCompleteWithCompose(TwitterSession session) {
    ScreenCapture.CaptureScreenshot("Screenshot.png");
    UnityEngine.Debug.Log ("Screenshot location=" + Application.persistentDataPath + "/Screenshot.png");
    string imageUri = "file://" + Application.persistentDataPath + "/Screenshot.png";
    Twitter.Compose (session, imageUri, "Welcome to", new string[]{"#TwitterKitUnity"},
    (string tweetId) => { UnityEngine.Debug.Log ("Tweet Success, tweetId=" + tweetId); },
    (ApiError error) => { UnityEngine.Debug.Log ("Tweet Failed " + error.message); },
    () => { Debug.Log ("Compose cancelled"); }
    );
    img.color = Color.red;
    }`
    After taking the first screenshot close the dialogue and take a new one with the new button color. It shows an image from the previous dialogue.

Once the picture is tweeted the right screenshot is uploaded however I would like the screenshot to be previewed in the dialogue before it is posted

  • SDK Version: 3.2.1
  • Unity Version: 2017.3.1
  • Device name and OS version:
    Xperia XA1 Ultra (g3223)
    Android 7.0
@alleluso
Copy link

alleluso commented Jun 7, 2018

I have the same issue. Hoping for a fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants