iOS Facebook app invite: error - facebook-ios-sdk

I have to implement Facebook invite in my iOS app.
I am following below reference link:
https://developers.facebook.com/docs/app-invites/ios
and
created app link as per below link:
https://developers.facebook.com/docs/applinks
I am facing below error:-
Error Domain=com.facebook.sdk.core Code=9 "The operation couldn’t be completed. (com.facebook.sdk.core error 9.)"
in below FBSDKAppInviteDialogDelegate delegate method
func appInviteDialog(appInviteDialog: FBSDKAppInviteDialog!, didFailWithError error: NSError!) {
println("didFailWithError: \(error)")
}
My plist setting is
My code is as given below:
#IBAction func btnInviteClicked(sender: UIBarButtonItem) {
var content: FBSDKAppInviteContent = FBSDKAppInviteContent()
content.appLinkURL = NSURL(string: "https://fb.me/MyFacebookAppLinkURL")
//Optional
content.appInvitePreviewImageURL = NSURL(string: "AnyImageURL")
FBSDKAppInviteDialog.showWithContent(content, delegate: self)
}
Pls suggest any solution, to show invite pop up and work successfully.
Thanks in advance.

Make sure you have [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; in your AppDelegate. I've spend two days while trying to fix that.

If you haven't created an appLinkURL as #Rumin suggested in the comments, you can create them and make sure they work here https://developers.facebook.com/quickstarts/?platform=app-links-host.
When you have your app links ready, make sure you have your app working with the latest App Transport Security restrictions made in iOS 9 and also whitelisting the other Facebook apps, follow this link https://developers.facebook.com/docs/ios/ios9.

Related

How to integrate Stripe STPPaymentOptionsViewController with Swift 5?

Previously I integrated STPAddCardViewController in Swift, where user can give the card details and I sending the token to backend. Now I have to integrate the STPAddCardViewController with swift5. I checked Stripe docs -https://stripe.com/docs/mobile/ios/basic.
Unable to setup the ephemeral key and also proceed with some construct thing. I have inherited
STPPaymentOptionsViewControllerDelegate and the delegate method
func paymentOptionsViewController(_ paymentOptionsViewController: STPPaymentOptionsViewController, didFailToLoadWithError error: Error) {
}
func paymentOptionsViewControllerDidFinish(_ paymentOptionsViewController: STPPaymentOptionsViewController) {
}
func paymentOptionsViewControllerDidCancel(_ paymentOptionsViewController: STPPaymentOptionsViewController) {
}
But I am unable to send the token to backend.When we used card the token used to be like this start like this -> "tok_ ..." Now if used Payment then token will start with "P.."
I will be highly obliged if any body help me regarding this.

MSAL.Net and Xamarin.Forms having problem with redirect url

I am following this guide https://github.com/Azure-Samples/active-directory-xamarin-native-v2/tree/master/1-Basic
and have this code in my app.xaml.cs
public App()
{
PCA = PublicClientApplicationBuilder.Create(applicationClientId)
.WithTenantId("tenantidhere")
.WithRedirectUri($"msal{applicationClientId}://auth")
.WithIosKeychainSecurityGroup("com.microsoft.adalcache") // focussing on android first so ignore this one
.Build();
//...
}
I get the message that there is something wrong with the return url... and the continue button does not seem to work. I don't know if the issues are related or sepearate.
Here are my azure settings in the azure AD:
I felt that I had to switch back to the 'old experience' because the guides/tutorials etc. does not seem to reflect the current Azure UI.
You will have updated the value of DataScheme on MsalActivity.cs and AndroidManifest.xml with the correspondent clientId of your application.

How to Play Youtube Videos In Windows phone 8 application? and make application Resolution compatible

Hello I am developing a windows phone 8 application. My application is complete i am left with two things
first, i have to play videos from youtube channel.
second, i have to make application resolution compatible.
I visited so many pages but no luck.
can someone help me out, My deadline for application submission is near.
You should add MyToolkit.Extended package from NuGet.
try
{
var videoUri = await MyToolkit.Multimedia.YouTube.GetVideoUriAsync(
"uRs4hz1YEQc", MyToolkit.Multimedia.YouTubeQuality.QualityMedium);
MediaYouTubeVideo.Source = videoUri.Uri;
}
catch (Exception exception)
{
// TODO: Show error
}
Have to say that I have not checked the example, but at least the details on the page suggest that you an use it for playing you tube videos: http://code.msdn.microsoft.com/wpapps/Youtube-Video-Sample-f2692dc9

Launch Settings from app?

Anyone know if it's now feasible to launch the 'Settings' app from your app? Google Maps does it when you don't have Location Services enabled and you try to locate yourself.
I've seen lots of folks post about it and most answers point to adding a bug in Radar.
In the wild, I know of two apps that show this dialog with ""Turn on Location Services to Allow [app] to Determine Your Location" along side Cancel and Settings buttons where the 'Settings' button will take you to the General Settings.
1) Facebook app version 3.3.2 that runs on iOS 3.1.3 shows this alert on start. I looked at the three20 source code in git-hub but that project is not really a full source of the app but more of a library with the app's components.
2) GroupMe also shows the same alert when adding current location to a new message.
You mean the settings of the app like you see in settings?
First create a settings.bundle in xcode>newfile>settings.bundle.
This will create some prop lists that you can edit from out of the Settings.app or your app self. For the exact code Google can help you a lot further that I can. If you have any specific questions; don't hesitate to ask.
In iOS 5.0 you can open settings using the "prefs://" URL scheme. But in iOS 5.1 it doesn't work. But there is a trick I used for login twitter account using settings inside my app. the code is
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];
// Create the completion handler block.
[tweetViewController setCompletionHandler:^(TWTweetComposeViewControllerResult result)
{
[self dismissModalViewControllerAnimated:YES];
}];
// Present the tweet composition view controller modally.
[self presentModalViewController:tweetViewController animated:YES];
tweetViewController.view.hidden = YES;
for (UIView *view in tweetViewController.view.subviews){
[view removeFromSuperview];
}
Using this code you can switch to settings from your app directly if you are not already logged in twitter account.

Publishing Check-in via Facebook IOS SDK

I'm trying to publish a check-in on a users wall. I don't need to get the longitude and latitude of the users device. But rather have this static as well as the place the user will check-in too. Basically a "check-in" button that already has static coordinates and a message.
I got the demo app up and running but can't seem to find any step by step tutorials on this particular topic. Is there any link around or a sample project you can point me to?
Thanks!
First, you need to have a place id. Assuming you have that you can use the Facebook Graph API to make a feed post to check-in the user.
You can do something like this (using Facebook iOS SDK 3.0):
[FBRequestConnection startForPostStatusUpdate:#"Awesome place!"
place:#"110506962309835"
tags:nil
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
//verify result
}
];
Or:
[FBRequestConnection startWithGraphPath:#"me/feed"
parameters:#{#"place":#"110506962309835"}
HTTPMethod:#"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
//verify result
}];
You will need to ask the user for publish_stream permission before making this call.

Resources