Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c0140de4
authored
Jul 02, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交facebook bug处理
parent
5209902e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/ThirdParty/TwitterHelper/FacebookHelper/FUSFacebookHelper.swift
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/ThirdParty/TwitterHelper/FacebookHelper/FUSFacebookHelper.swift
View file @
c0140de4
...
@@ -124,6 +124,20 @@ import FBSDKLoginKit
...
@@ -124,6 +124,20 @@ import FBSDKLoginKit
var
shareSuccessHandle
:
(()
->
Void
)?
var
shareSuccessHandle
:
(()
->
Void
)?
var
shareFailureHandle
:
((
_
isCancel
:
Bool
)
->
Void
)?
var
shareFailureHandle
:
((
_
isCancel
:
Bool
)
->
Void
)?
/// 判断当前设备是否安装了 Facebook App
private
func
fus_hasFacebookAppInstalled
()
->
Bool
{
guard
let
facebookURL
=
URL
(
string
:
"fbapi://"
)
else
{
return
false
}
return
UIApplication
.
shared
.
canOpenURL
(
facebookURL
)
}
/// 优先使用 Facebook 原生分享,未安装 Facebook 时直接降级到浏览器分享
private
func
fus_showFacebookDialog
(
_
dialog
:
ShareDialog
)
{
dialog
.
mode
=
fus_hasFacebookAppInstalled
()
?
.
native
:
.
browser
dialog
.
show
()
}
/// 分享
/// 分享
public
func
fus_facebookShare
(
type
:
FUSFacebookHelperShareType
,
controller
:
UIViewController
?,
contentURL
:
String
,
image
:
UIImage
?,
imageUrl
:
String
?,
success
:
(()
->
Void
)?,
failure
:
((
_
isCancel
:
Bool
)
->
Void
)?){
public
func
fus_facebookShare
(
type
:
FUSFacebookHelperShareType
,
controller
:
UIViewController
?,
contentURL
:
String
,
image
:
UIImage
?,
imageUrl
:
String
?,
success
:
(()
->
Void
)?,
failure
:
((
_
isCancel
:
Bool
)
->
Void
)?){
...
@@ -144,7 +158,7 @@ import FBSDKLoginKit
...
@@ -144,7 +158,7 @@ import FBSDKLoginKit
shareContent
.
ref
=
"FusiYa"
shareContent
.
ref
=
"FusiYa"
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
dialog
.
show
(
)
fus_showFacebookDialog
(
dialog
)
}
}
else
if
type
==
.
image
,
else
if
type
==
.
image
,
let
image
=
image
{
let
image
=
image
{
...
@@ -154,7 +168,7 @@ import FBSDKLoginKit
...
@@ -154,7 +168,7 @@ import FBSDKLoginKit
shareContent
.
photos
=
[
photo
]
shareContent
.
photos
=
[
photo
]
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
dialog
.
show
(
)
fus_showFacebookDialog
(
dialog
)
}
}
else
{
else
{
// web
// web
...
@@ -164,7 +178,7 @@ import FBSDKLoginKit
...
@@ -164,7 +178,7 @@ import FBSDKLoginKit
shareContent
.
ref
=
"FusiYa"
shareContent
.
ref
=
"FusiYa"
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
let
dialog
=
ShareDialog
(
viewController
:
vc
,
content
:
shareContent
,
delegate
:
self
)
dialog
.
show
(
)
fus_showFacebookDialog
(
dialog
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment