Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
social_wall
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
social_wall
Commits
9af29467
Commit
9af29467
authored
1 month ago
by
Sven Schüring
Committed by
Nicolas N
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3498702
by sunlix: Instagram: There are no medias after first profile fetch
parent
2a09dc30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Call for medias directly based on plugin config
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/SocialNetwork/InstagramSocialNetwork.php
+2
-3
2 additions, 3 deletions
src/Plugin/SocialNetwork/InstagramSocialNetwork.php
with
2 additions
and
3 deletions
src/Plugin/SocialNetwork/InstagramSocialNetwork.php
+
2
−
3
View file @
9af29467
...
...
@@ -164,6 +164,7 @@ class InstagramSocialNetwork extends SocialNetworkBase implements ContainerFacto
$cachePool
=
new
FilesystemAdapter
();
$api
=
new
Api
(
$cachePool
,
$this
->
httpClient
);
$profile
=
$api
->
getProfile
(
$account_to_retrieve
);
$profile
=
$api
->
getMoreMedias
(
$profile
,
$nb_of_posts
);
$medias
=
$profile
->
getMedias
();
if
(
!
empty
(
$medias
))
{
...
...
@@ -172,9 +173,7 @@ class InstagramSocialNetwork extends SocialNetworkBase implements ContainerFacto
'#elements'
=>
[],
];
for
(
$i
=
0
;
$i
<
$nb_of_posts
&&
$i
<
count
(
$medias
);
$i
++
)
{
$media
=
$medias
[
$i
];
foreach
(
$medias
as
$media
)
{
// Truncate caption.
$caption
=
nl2br
(
Xss
::
filter
(
$media
->
getCaption
()));
if
(
!
empty
(
$caption
)
&&
$text_length
>
0
&&
strlen
(
$caption
)
>
$text_length
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment