How to launch the ViewContent facebook event in React Native? - facebook

I'm trying to trigger the ViewContent event (https://developers.facebook.com/docs/facebook-pixel/reference#events) using the version 0.10.1 of react-native-fbsdk. This should be registered in the panel you see in the image, but it still appears in red.
The only function the SDK gives me to launch events is the logEvent function. So I'm doing it this way:
const viewContentData = {
content_name: name,
content_category: type,
content_ids: id,
content_type: type,
value: amount,
currency,
};
yield call([AppEventsLogger, 'logEvent'], 'ViewContent', viewContentData);
Does anyone know how to make it work?
Thank you so much :)

Do you try to use it on Web or Mobile? I believe for react native you have to use mobile events SDK integration:
https://developers.facebook.com/docs/react-native/app-events
If you want to use it on the Web, all you have to do is initializing the pixel base code properly and then firing the event via fbq helper function:
https://developers.facebook.com/docs/facebook-pixel/advanced/

Related

Why doesn't the DeepLink helper launch my Android app?

My app is based on this code sample from Google: https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_question.deeplink.html
Here is a snippet directly from my code:
app.intent('Default Welcome Intent', conv => {
conv.ask('Great! Looks like we can do that in the app.')
conv.ask(new DeepLink({
destination: 'MyBookApp',
url: 'https://www.mybooksite.com/read/123456789',
package: 'com.mybook.app.reader',
reason: 'handle this for you',
}))
})
// Create a Dialogflow intent with the `actions_intent_LINK` event
app.intent('Get Link Status', (conv, input, arg, status) => {
// possibly do something with status
conv.close('Okay maybe we can take care of that another time.')
})
When I run this app I see "Okay maybe we can take care of that another time." instead of my app being launched.
Is there code missing in my handler for the 'Get Link Status' intent? (I created the intent according to the comment above that line).
Am I passing the wrong params to the DeepLink object? I can't find docs for them anywhere.
Note: My app is definitely coded to handle http deep links including verification with Google Digital Asset Links and the deep link URL I'm testing with works perfectly from other apps.
Any suggestions or help is much appreciated!
Thanks in advance...
Your welcome intent handler is missing an additional call to conv.ask before the deep link call:
conv.ask('Great! Looks like we can do that in the app.')
All responses should have at least a simple response.

Unity3d Facebook AppRequest filter

In my Unity project for IOS i use
FB.AppRequest(
message: "somedesc",
title: "sometitle",
callback:appRequestCallback );
I want filter and show only friends who don't install app, but filters = ["app_users"] and
excludeIds = "someIdValue" not working
How solved this problem
(I use Facebook Unity SDK, https://developers.facebook.com/docs/unity)
You can use this:
// "app_non_users" will list friends that haven't installed the game yet
List<object> filter = new List<object>() { "app_non_users" };
// Then, call the API with this filter. Enjoy!
FB.AppRequest("Test Message", null, filter, null, 0, string.Empty, string.Empty, this.HandleResult);
In the examples that are provided within the Facebook SDK for Unity, there's a scene called AppRequests. From there, I've seen a class named AppRequests.cs, in which you can find several examples on how to use these app requests.
Note: To try this examples, make sure to add all FacebookSDK provided scenes to your build settings scenes. Test them in device.
FB Unity SDK documentation says that filters are currently supported:
Filter are currently not supported for mobile devices
You should probably get list of friends first with a request like this with FB.API method:
FB.API ("/me/friends?installed=false", HttpMethod.GET, Callback, null);

How do I detect if the Facebook Send Dialog is available?

The send dialog is a useful piece of functionality.
Sadly it is not available on mobile devices
I call the api in the following way;
app.sendMessage = function(){
FB.ui({
app_id: app.facebook_app_id,
method: "send",
link: "http://google.com"
});
};
Right now the outcome on a mobile device is a nasty error page.
Is there a way to detect in javascript whether or not the send dialog is available?
I'd suggest something like;
function sendDialogAvailable(){
return FB.supports("senddialog");
}
I could then change my app's functionality according to this property, but right now I fear I'll have to resort to browser sniffing.

Get Group details from Facebook using Appcelerator

I am developing an iOS app using Appcelerator. In this app I need to get information from a Facebook Group.
Using the URL directly works fine. I get a complete data set of all groups docs.
https://graph.facebook.com/2389876494501676/docs?access_token=TOKEN HERE
But using the Appcelerator Facebook module just returns an empty data set.
Titanium.Facebook.requestWithGraphPath('2389876494501676/docs', {}, 'GET', function(e) {
Ti.API.info(e);
});
What is wrong?
I don't see you passing token via your function. That might be the problem
Nope, the token is handle by the module already.
Try Ti.API.info(e.result) you should be able to see the result.

phonegap Application Location Accessing Issue?

In my phonegap iPhone app, while i am trying to load a html with google maps acces using sencha-touch. A notification shows "/iphone simulator/...../index.html access your Location" . How can i change the html file name to application name?.
Make sure you are calling "navigator.geolocation.getCurrentPosition" after phonegap initialization is done. So for example:
document.addEventListener('deviceready', function () {
navigator.geolocation.getCurrentPosition(successCallback, errorCallback);
}, false);
If that still doesn't do the trick, try adding a delay.