- Home /
Posting on Facebook from Facebook's application for IOS. How?
Hello. I make posting to Facebook for IOS.
There is a script that which opens Safari.
using UnityEngine;
using System.Collections;
public class facebookScript: MonoBehaviour {
const string AppId = "8722581399999999";
const string ShareUrl = "http://www.facebook.com/dialog/feed";
public static void Sharefb (string link, string pictureLink, string name,
string caption, string description, string redirectUri)
{
Application.OpenURL (ShareUrl +
"? App_id =" + AppId +
"& Link =" + WWW.EscapeURL (link) +
"& Picture =" + WWW.EscapeURL (pictureLink) +
"& Name =" + WWW.EscapeURL (name) +
"& Caption =" + WWW.EscapeURL (caption) +
"& Description =" + WWW.EscapeURL (description) +
"& Redirect_uri =" + WWW.EscapeURL (redirectUri));
}
}
I need the same or similar as possible to the application Facebook. I realized that I need to expose this type of link fb://albums, to open from application. I removed all the parameters and was just trying to start open any link, but nothing.
I tried to just open such links: 'fb://friends' and 'fb://publish/?text=some text to post'
Just open the app of Facebook. (standart page)
What do I do wrong? I need install Facebook sdk? What's the Problem?
Help me, please.
Answer by zzzzzz789 · Sep 30, 2015 at 10:34 PM
Look into the Facebook SDK for Unity for implementing Facebook social features into your game. To share content like you have described check into FB.ShareLink or FB.FeedShare.
Your answer
![](https://koobas.hobune.stream/wayback/20220612000203im_/https://answers.unity.com/themes/thub/images/avi.jpg)