social_stream's People
social_stream's Issues
Usage of realurl without domain records
Using realurl
does not necessarily mean the website also uses domain records. In the BaseUtility.php
there is this code:
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($id);
$host = \TYPO3\CMS\Backend\Utility\BackendUtility::firstDomainRecord($rootline);
$_SERVER['HTTP_HOST'] = $host;
}
which will lead to problems later on (empty host).
Also the code
$actualUrl = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
in the file Classes/Controller/Wizard/TokenController.php
should be replaced by
$actualUrl = $base . $_SERVER['REQUEST_URI'];
to avoid problems.
Basic template examples should be included
All the template folders are missing in the published version of the extension. Configured in the setup.txt are the paths:
plugin.tx_news {
view {
templateRootPaths.9 = EXT:social_stream/Resources/Private/Templates/
partialRootPaths.9 = EXT:social_stream/Resources/Private/Partials/
layoutRootPaths.9 = EXT:social_stream/Resources/Private/Layouts/
}
}
but none of those folders exist.
Use EXT:news import service
Hi,
I'm new to this extension but as far as I can see it doesn't use the EXT:news import service
https://docs.typo3.org/typo3cms/extensions/news/DeveloperManual/ExtendNews/ImportService/Index.html
Maybe this extension could be improved using it.
By instance, this extension uses it's own field for link to the post originating the news. Using EXT:news import service the link could be created using EXT: news link model (table: tx_news_domain_model_link
).
Facebook API version should be configurable
Calls like https://www.facebook.com/v2.5/...
should be configurable as the API version increases quite regularly and older version get outdated.
Too few arguments to function Socialstream\SocialStream\Controller\Wizard\TokenController::mainAction(), 1 passed and exactly 2 expected
Hello,
just copied the extension into my TYPO3 9.5.8, followed the instructions and got stuck on generating the access token for facebook.
App id, app secret and social id are correct. But the popup does not open facebook as in the instruction - instead it pops up the error.
Even tried to put in the access token by hand via Access Token Debugger of facebook, but then it returns a 404 in backend.
Any idea, where my error could be?
Will there be any problems with the newer fb graph version (3.3) and the permissions on facebook app? We just have "email, manage_pages, pages_show_list, public_profile".
Thank you in advance
Publication workflow
The latest versions 2.0.3 and 2.0.4 were not published to TER. It would be nice if you could tag (git) your released versions here, so using it with explicit link to the repository will be possible. Right now, there is no easy way to get the most recent version with composer :-(
BTW: there is also a quite easy way to automatically publish new versions to packagist by just registering it there and adding the hook here at GitHub, see https://packagist.org/packages/submit for details, takes just 10 minutes ;-)
Broken Dependency injection by not using ObjectManager to get new objects
You use \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()
quite often in the whole extension. This is only correct for creating the object manager itself as the call will NOT respect all the dependency injection stuff at all. So instead of doing things like:
$this->configurationManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
this would be correct:
$this->configurationManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager');
or even better this:
/**
* @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManager
* @inject
*/
protected $configurationManager = null;
Also calls like
$news = new \Socialstream\SocialStream\Domain\Model\News();
$cat = new \GeorgRinger\News\Domain\Model\Category();
$classname = "\\Socialstream\\SocialStream\\Utility\\Token\\".ucfirst($type)."Utility";
return new $classname($pid);
do neither respect registered xclasses nor will any dependency injection work! All those calls should be made to ObjectManager::get()
instead.
Don't rely on direct cURL calls
Using curl directly will cause problems with certain TYPO3 options like settings a proxy connection for outgoing traffic. Instead, the RequestFactory
in the core should be used to avoid such problems and to provide more flexibility to configure the used adapter.
Avoid file_get_contents()
All calls to file_get_contents()
should be replaced by \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl()
Remove duplication of code
There are a lot of code duplications inside the extension.
// in TokenUtility and FeedUtility those methods could be removed completely
public static function initTSFE($id = 1, $typeNum = 0) {
parent::initTSFE($id,$typeNum);
}
public function initSettings(){
parent::initSettings();
}
The constructors should also be moved from derived classes into the base class if they are all the same like
/**
* __construct
*/
public function __construct($pid=0)
{
if($pid) {
$this->initTSFE($pid, 0);
$this->initSettings();
}
}
Same applies to methods like getCategory()
in the *Utility classes.
Those are just examples, there is a lot more code duplication here.
Facebook API returns only preserved params
Return Parameters have to be transferred via &state now
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.