Open graph story is not visible in time line after posting - facebook-opengraph

I am using Facebook android SDK version 4.3.0. I want post my stories via open graph story method. This is my code.
`ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "mygame.life")
.putString("og:title", "Sample Game")
.putString("og:description", "sample game to publish story")
.build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("mygame.ask")
.putObject("life", object)
.build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("life")
.setAction(action)
.build();
shareDialog.show(activity,content);`
It's working and also returns post Id. But there is no stories in my timeline. How can I solve it?

Are you done all nesssary steps
give(request) publish_actions
create and review action and object

Eventually i found my mistake. I didn't enable "Tag" option in "Action Type" (Its essential to use setPeopleIds(peopleIds)) and also gave my app's name space wrongly.

Related

Firebase Analytics preventing proper use of dynamic link

I'm running in trouble here with Firebase.
The code is in flutter, I am testing in iOS
It's all going well, but when I try to get the dynamic link sent from:
auth.sendSignInWithEmailLink(parameters);
I get a debug message:
[Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
amv = 16;
apn = "com.myproject.app";
ibi = "com.myproject.app";
ifl = "https://myproject-com.firebaseapp.com/__/auth/action?apiKey=XXXXXXXXXXX&mode=signIn&oobCode=XXXXXX&continueUrl=https://myproject-com.firebaseapp.com/email123&lang=en";
link = "https://myproject-com.firebaseapp.com/__/auth/action?apiKey=XXXXXXX&mode=signIn&oobCode=XXXXXX&continueUrl=https://myproject-com.firebaseapp.com/email123&lang=en";
}
where I changed my project name to "myproject" and put XXX inplace of apiKey/oobcode
and then, when I try to get the dynamic link with my app
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
data is null.
So I am guessing Firebase Analytics is processing it and "killing" the dynamic link before my app can parse it.
Anyone managed to go through this?
I found the problem.
It is not that Firebase Analytics was "consuming" and killing the deep link.
The thing is that in iOS still today there is a delay the link and the state cycle...
https://medium.com/#diegoveloper/flutter-firebase-dynamic-link-6f1b79278ce0
This link explains it, problem 2 in the blog post.
Solved. I can still use analytics in Firebase.
It is impossible to remove analytics btw, you can only disable it.

Custom FCM notification sound for unity android

In my unity project I want play custom sound when I get firebase cloud message, not system default sound.
So after I followed other answers my message looks like,
{
"to": "some_key",
"notification": {
"title": "Title",
"android_channel_id": "2",
"body": "Body",
"sound": "custom_sound.wav"
}
}
and I placed custom_sound.wav in Asset/Plugins/Android/res/raw. When I unzip my .apk, I can find my sound file is in right location.
But it keeps playing system default sound. Even after I remove sound field. Is there any other thing should I check?
First: a quick tip when debugging. If you select "Export Project", you can open the generated Gradle project with Android Studio:
Occasionally you have to update the gradle wrapper, but it helps a ton debug things like "is my sound file in res/raw" without having to decompress your APK and poke around.
I think that the issue you're running into now is that sounds are now associated with NotificationChannels (as of Android O) rather than individual notifications, as noted by this StackOverflow post expressing a similar issue. Since this isn't exposed via the Unity SDK.
Fortunately, you can add a channel with Unity.Notifications.Android.
It should be as simple as creating a new
public AndroidNotificationChannel(string id, string title, string description, Importance importance)
with your id set to "2" (to match your sample notification above. Since this is a string, I would recommend giving this a better name :D).
Then you can call RegisterNotificationChannel with that channel you create as your parameter.
For example, to get your notification above to work, I believe you can write:
var notificationChannel = new NotificationChannel("2", "Channel 2 (working title)", "This is the 2nd channel", Importance.Default);
AndroidNotificationCenter.RegisterNotificationChannel(notificationChannel);
Let me know if this helps!
--Patrick

How to get query parameters value from deep link while dynamic link created using AppInvitation class using Firebase?

In my app, I am sending invitation to people to join my app. I am using AppInvitation IntentBuilder Class to create Intent. After these steps, one URL-link gets generated that we can send to invitees.
I have written below code to generated that link and start the activity to send the link. I am able to send invites and able to successfully launch the app by clicking the dynamiclinks. Both the dynamically and manually created ones.
IDictionary<string, string> values = new Dictionary<string, string>();
values.Add("utm_campaign", "Health");
values.Add("utm_medium", "GoIbibo");
values.Add("ad", "1");
values.Add("credit", "50");
values.Add("utm_source", "Yahoo");
values.Add("afl", "https://www.facebook.com");
var intentbuidl = new AppInviteInvitation.IntentBuilder(MainActivity.mainActivity.GetString(Resource.String.invitation_title))
.SetMessage(MainActivity.mainActivity.GetString(Resource.String.invitation_message))
.SetDeepLink(Android.Net.Uri.Parse(MainActivity.mainActivity.GetString(Resource.String.invitation_deep_link)))
.SetAdditionalReferralParameters(values)
.Build();
MainActivity.mainActivity.StartActivityForResult(Intent.CreateChooser(intentbuidl, "Install"),0);
Generated link: https://aku4q.app.goo.gl/i/619426442529-4a4105fd-33ea-4b0f-bf07-6f4063eef8f8
So my question is, when do invitees open the app using this link? Can we be able to get these additional parameters which I have set using IDictionary from the above generated link?
To my knowledge, no. This is one of the limitations of Firebase deep linking — you can't pass custom parameters and need to use the URL string for everything.
You could check out Branch.io (full disclosure: I'm on the Branch team) for an alternative approach that does allow custom parameters.

How to get resourceName for Tridion LocalizableMessage when creating new PublisherException?

I need to stop publishing of a page when a certain condition exists, for example if the page name contains 'one' using the Event System. Also, the other pages should continue to publish.
I am thinking to use a PublisherException instead of a generic exception.
The problem is the I do not know the resourceName of the LocalizableMessage. Any ideas?
if (item.Title.ToString().Contains("one"))
{
Localization.LocalizableMessage errResource = new Localization.LocalizableMessage("error");
throw new PublisherException(errResource, new Exception("Can't get there from here!"));
}
The Event System can stop Publishing, there is no middle ground there though, when you throw an exception, it stops the entire transaction.
Like Puntero mentions, if you want to remove an item from a Publish Transaction, that is where a Custom Resolver comes in. From here you cannot communicate back to the Publish Transaction, but you have access to the Tridion Logger (eventlog):
Tridion.Logging.Logger.Write("your message string", "MyResolver", LoggingCategory.General, TraceEventType.Information);
With regards to your LocalizableMessage in the Event System, you should be able to do the following:
throw new PublisherException(new LocalizableMessage(Properties.Resources.ResourceManager, "PagePublishErrorMessage"));
Where the resourceName is pointing to the name of a String resource you have in your Project.
I agree with #Puntero that if you want other page in a publish action to go through, you should use a Resolver rather than an Event Handler.
I tried to raise a warning to alert users of one item not being resolved, but failed. But there may be some good tips/ideas for you here: Raising a “warning” status during SDL Tridion 2011 publishing
In the end, the only way I could get anything to work was to set "Allow X failures", and then do a check in a template, and raise the error there. That will count as a Render failure, and allow the publisher to move on to the next item in the publish transaction.
As for the message? What message would you like to display?

Why do I get for every call to the Facebook open graph the same action-instance-id?

I am currently trying out the Facebook Open Graph.
When I successfully post an action to the Open Graph I get as the described in the documentation the action-instance-id.
{
id: “{action-instance-id}”
}
But I always get the same response. So the same ID. Even if I try different actions the result stays the same. Is this expected behavior? I would expect every action instance to get a new id. Or is it only for my developer account?
Are you absolutely sure you're posting a new action, and not reading the details of the existing action? Including your code might help
It looks like you're making a GET request to the action ID, not posting a new user->action->object connection, as those will have unique IDs

Resources