Search Unity

FB SDK - publish video (or link) and add mention to a page

Discussion in 'Scripting' started by adre, Apr 18, 2019.

  1. adre

    adre

    Joined:
    Mar 28, 2014
    Posts:
    37
    Hey everyone,
    i'm struggling since 5 days to find a workaround to an issue with facebook sdk for unity, which i downloaded from facebook developer website which is more updated.

    Basically my app generates a video memory of a trip of the user which i save in the permanent folder, then it's supposed to publish the video on the user's feed and mention three facebook pages ( three venues ) which the users visits during the trip.

    It is crucial that the app posts the video ( or as alternative i can upload a video to a server and post a link with open graph ) AND suggests hashtags or mentions in the text field of the post. The steps should've been:

    - user taps Share on Facebook
    - the modal with the post opens with the text filled with mentions or hashtags
    - the user can choose to delete them or just write its message and then upload.

    Seems like since april 2018 a lot changed in policies, but i'm pretty sure there is a workaround since you can do this with facebook native sdk.

    Any SAINT could help me here? Would be really appreciated.
    Thanks!
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    4,754
    You can't prefill text anymore using the share call in the FB sdk for Unity.

    The work around, if you can call it that, is to either generate an HTML file with all the tags included in there and you share that html file, or you can also use php I've heard to create the html file and have that be your share. We ended up going with the html file method to share images which are stored on a server.

    Your use case may be different, so you might want to look into the php method to see if it does what you want.
     
    adre likes this.
  3. adre

    adre

    Joined:
    Mar 28, 2014
    Posts:
    37
    Thanks Brathnann for the answer.
    Could you elaborate a bit more? I can create an html in Unity, but I can't find any metatag from graph api to use to add hashtags in a post when sharing the page.
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    4,754